Hi Dominik,

> Hi.
> 
> Currently, I'm doing a lot of refactoring / reimplementation on my 
> software system. One of the tasks among others is porting the beast to 
> windows - and that's giving me serious headaches - maybe one of the more 
> windows experienced of you can give me a hint here.
> 
> Let me shortly sketch my architecture:
> I have a program, that uses 2 dlls, called Common.dll (doesn't use 
> OpenSG at all) and System.dll (this one does) that are used by the main 
> program. While System defines most of the (graphics related) framework, 
> all the functionality is encapsulated in plugins that are loaded at 
> runtime using dlsym on Linux / LoadLibrary on Windows. For example, 
> there are abstract Display and DisplayImp classes defined in the 
> System.dll and a derived SimpleSceneManagerDisplay class implemented as 
> a plugin (Display_simpleSceneManager.dll).
> 
> Everything works perfectly on Linux, but on Windows (using MSVC2005 
> Professional, and a 1.8 daily build) the following happens:
> 
> If I add OSG::GLUTWindow::create() in a class of my System.dll, it 
> returns a valid WindowPtr. But if I use the same call in my plugin, it 
> returns NullFC. I use the same compiler / linker options for both 
> (attached the debug versions below). Both calls are done in the same thread.
> 
> * Under what circumstances returns OSG::GLUTWindow::create() null? After 
> looking into the code, the create call copies a prototype and returns it 
> - when can that go wrong?
> * Is there anything to consider when using OpenSG in a dll that is 
> loaded via LoadLibrary? Has anybody had problems with that before?
> 
> I also have a second plugin (Scene_default.dll) that does the following 
> in its constructor:
> 
>     _transform = OSG::ComponentTransform::create();  
>     _sceneRootNode = OSG::Node::create();
>     beginEditCP(_sceneRootNode);
>       _sceneRootNode->setCore(_transform);
>       _sceneRootNode->addChild(OSG::makeTorus(1.5,2,32,32));
>     endEditCP(_sceneRootNode);
> 
> But here, I get valid NodePtrs for _transform and _sceneRootNode, so I 
> doubt that this is a general "::create" problem. osgInit is called 
> before loading the plugins in the System.dll. But moving it to the 
> display plugin had no effect either so this is propably not the cause. 
> Ah, and of course, the Tutorials all work fine, so GLUT and all that is 
> obviously working. The compiler / linker options are copied from one of 
> the tutorials (except that .exe was changed to .dll).
> 
> Any ideas?
> 
> Thanks in advance,
> Dominik

I had a similar problem but this was on windows 64bit. Installing VS 
2005 Service Pack 1 fixed the problem. Did you install the SP1?

Andreas

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to