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 05:53:42 EDT (-0400)
  Re: Patch to allow native functions in DLLs?  
From: Chris Cason
Date: 27 Sep 2015 12:27:18
Message: <560818e6@news.povray.org>
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


Post a reply to this message

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