Hi Jean-Sébastien, Looks like the constructor of the base class (GraphicsWindowWin32) is not being called by your derived class (_realized is false).
André -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Sébastien Guay Sent: February-15-08 3:39 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Overriding the SwapBuffers call Hi Robert, Windows gurus, > Simply assign your custom GraphicsWindow implementation to the > viewer's osg::Camera's directly, rather than rely upon > View::setUpView*() methods. I've gotten this to work partially. My method is getting called, but I get only black onscreen. My overridden swapBuffersImplementation looks like: virtual void MyGraphicsWindowWin32::swapBuffersImplementation() { std::cout << "Before SwapBuffers" << std::endl; osgViewer::GraphicsWindowWin32::swapBuffersImplementation(); std::cout << "After SwapBuffers" << std::endl; } Am I missing anything? As I said, the prints are in the console, but the screen stays black. Thanks in advance, P.S. For anyone who would need to do this in the future, for Win32 the Win32WindowingSystem does some work in its createGraphicsContext() method, and if this is not done, any call to GraphicsWindowWin32::createWindow() will fail. So you need to call osg::GraphicsContext::createGraphicsContext(traits.get()); once (even if you don't keep the return value), which sets things up so the custom window can be created directly afterwards. I hope this can save someone else the frustration I experienced trying to get my custom GraphicsWindow to be created correctly... :-) J-S -- ______________________________________________________ Jean-Sebastien Guay [EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

