POV-Ray : Newsgroups : povray.general : Calling external Math functions from .dll or .so : Re: Calling external Math functions from .dll or .so Server Time
2 Aug 2024 14:17:07 EDT (-0400)
  Re: Calling external Math functions from .dll or .so  
From: ABX
Date: 14 Feb 2005 14:43:02
Message: <h1v111pblvitnbqk2865mcna1thcr977vc@4ax.com>
On Mon, 14 Feb 2005 19:14:58 +0100, "Jérôme M. Berger" <jbe### [at] ifrancecom>
wrote:
>ABX wrote:
>| Could you name all those modern raytracers which are written in C++,
>support
>| lodable plugins compiled to machine code, exists in builds for Mac,
>Windows
>| nad *nixes and support all the possible CPU architectures where
>mentioned
>| OS-es are working? Best with similar set of features as in POV-Ray.
>There must
>| be many of them which draw the standard you refer here.
>|
>	Well, Pixie for one: http://www.cs.berkeley.edu/~okan/Pixie/pixie.htm

I don't think that (quoting Pixie sources which you probably refer here) in
simple #if #else:

    #ifdef WIN32
	// Win32 stuff here
	cModule	=	LoadLibrary(name);
    #else
	// Unix stuff here
	cModule =	dlopen(name,RTLD_NOW);

all the platforms are handled. Even in wxWidgets where we wrap C++ around native
APIs (http://www.wxwidgets.org/manuals/2.5.3/wx_wxdynamiclibrary.html), we have
5 different representations of wxDllType and still do not cover all the possible
cases:

  // Note: WXPM/EMX has to be tested first, since we want to use
  // native version, even if configure detected presence of DLOPEN.
  #if defined(__WXPM__) || defined(__EMX__) || defined(__WINDOWS__)
    typedef HMODULE             wxDllType;
  #elif defined(HAVE_DLOPEN)
    #include <dlfcn.h>
    typedef void               *wxDllType;
  #elif defined(HAVE_SHL_LOAD)
    #include <dl.h>
    typedef shl_t               wxDllType;
  #elif defined(__DARWIN__)
    typedef void               *wxDllType;
  #elif defined(__WXMAC__)
    #include <CodeFragments.h>
    typedef CFragConnectionID   wxDllType;
  #else
    #error "Dynamic Loading classes can't be compiled on this platform, sorry."
  #endif

ABX


Post a reply to this message

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