Yes... I've just realized also that the plugins use the same system and seem to work correctly... :-( really really strange... as you said, maybe it would be a better idea not to use those proxy classes and rely simply on the function call, no ?
In GraphicsWindowX11.cpp i was using this code: RegisterWindowingSystemInterfaceProxy createWindowingSystemInterfaceProxy; // declare C entry point for static compilation. extern "C" { void graphicswindow(void) { osg::GraphicsContext::setWindowingSystemInterface(new X11WindowingSystemInterface); } } ... whereas the REGISTER_OSGPLUGIN() was creating a static proxy object... so I tried with the following code: static RegisterWindowingSystemInterfaceProxy createWindowingSystemInterfaceProxy; // declare C entry point for static compilation. extern "C" { void graphicswindow(void) { } } ... but this didn't work for me :-(... Manu. 2007/6/1, Robert Osfield <[EMAIL PROTECTED]>:
On 6/1/07, Emmanuel Roche <[EMAIL PROTECTED]> wrote: > Hi again Robert, > > concerning the self registering of the X11WindowingSystemInterface: no, if I > remove the stuff I added it's not working anymore... And I don't see how it > could work ? we are just calling an empty function in this case... > > how do you know the "X11WindowSystemInterface was registering itself anyway" > ??... it seems quite impossible to me with the sources on the SVN... :-( I know because I added debug messages to the constructor of X11WindowSystemInterface, the proxy in GraphicsWindowX11.cpp was doing the registeration automatically as it does when you link to the osgViewer.so, but it then was being screwed over by the static pointer reset somehow - I've got the debug message record showing the pointer set to the object in question, then changing back to zero without it ever being set programmaticaly. What is probably happening at your end is that the proxy was registering the X11WidowSystemInterface, then the static pointer was re-initialized, then your version of graphhicswindow_x11() function was registering X11WindowSystemInterface. Perhaps the solution is not to compile the proxy in static build, just rely upon the function to it. Curious the ive plugin is working and their is a proxy involved there too. This suggests to be that the static Registry pointer is already initialized in that case. Its seems to be a fluke though... Robert. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/