|
|
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
|
|