POV-Ray : Newsgroups : povray.general : Patch to allow native functions in DLLs? : Re: Patch to allow native functions in DLLs? Server Time
29 May 2024 07:59:34 EDT (-0400)
  Re: Patch to allow native functions in DLLs?  
From: Patrick Elliott
Date: 28 Sep 2015 00:57:05
Message: <5608c8a1$1@news.povray.org>
On 9/27/2015 9:25 AM, Chris Cason wrote:
> On 28/09/2015 02:10, David Given wrote:
>> Rather than path Povray directly, I'd prefer to instead add code to
>> allow me to load native functions out of an external DLL. That way I
>> don't have to modify Povray itself as I work.
>>
>> The actual code to do this seems fairly straightforward, but it would
>> save loads of time if someone had already done this. Has someone?
>
> Doing it *portably* is not as straightforward as you may hope. I don't
> know what platform you're using so I can't say what is likely to be
> out there, but I don't recall coming across a generic solution yet.
>
> If you just want to do it for yourself on a single platform, then you
> could probably do so easily enough (but then you could just as well
> compile the functions directly in).
>
> That aside, it's one thing to load a native function from an external
> DLL but another thing entirely to hook it into the rendering chain in
> a coherent manner: there would need to be some sort of specification
> (either in script, or built into the DLL) that defines how/where each
> entry point within it gets hooked in. This isn't an issue for code you
> insert directly into the source, of course.
>
> -- Chris
>
Well, one way around portability is, instead of trying to compile a dll, 
you just tack on something like Lua, as a extensible language for the 
core VM. Yeah, this might not be "efficient" speed wise, but.. you don't 
end up in the new version of DLL hell with it either (where there is 
this neat library someone wrote, for the freekie deekie OS, only FD uses 
zipidedooda libraries, which don't work anything like those for Fedora, 
and even less like the ones in Windows, and all they give you is a 
source, not even a compiled DLL, and no make file (never mind, zod 
forbid, one that isn't 5 years old, to convert to your compiler's 
syntax, for which specifications have changed 14 times since then...)

Man that sort of thing just royally frosts me. I don't know half the 
languages the things are written in well enough to figure out what they 
F they are "supposed to do", never mind the make file syntax well enough 
to figure out what the F its doing wrong, when trying to convert 
(assuming, again, it even has one). Maybe everyone else never has this 
problem? lol

Not that POV's developers would ever do this. But, we are not talking 
about "its" developers any more, when you start cramming someone else's 
extensions onto it. Somehow.. it just seems more sensible to me, in such 
cases, to have a language that is comprehensible, and isn't going to 
refer to strange stuff that doesn't exist on the machine I need to 
re-compile/install it for. ;)

-- 
Commander Vimes: "You take a bunch of people who don't seem any 
different from you and me, but when you add them all together you get 
this sort of huge raving maniac with national borders and an anthem."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.