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

Reply via email to