Hi Jean-Sébastien,

This looks fine. Try setting a breakpoint in
GraphicsWindowWin32::swapBuffersImplementation() to see in what state the
object is. Either _realized is false or the handle to the device context is
invalid (and this is not trapped by the ::SwapBuffers call as an error). I
assume you do not see anything reported on the console after the call (other
than you own traces).

André

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jean-Sébastien Guay
Sent: February-15-08 7:21 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Overriding the SwapBuffers call

Hello André,

> Looks like the constructor of the base class (GraphicsWindowWin32) is not
> being called by your derived class (_realized is false).

Here is my whole class (no joke!):

class MyGraphicsWindowWin32 : public osgViewer::GraphicsWindowWin32
{
     public:
         MyGraphicsWindowWin32 (osg::GraphicsContext::Traits* traits)
             : osgViewer::GraphicsWindowWin32(traits)
         {
         }

         virtual void swapBuffersImplementation()
         {
             std::cout << "Before SwapBuffers" << std::endl;
             osgViewer::GraphicsWindowWin32::swapBuffersImplementation();
             std::cout << "After SwapBuffers" << std::endl;

         }
};

So I would assume the base class constructor is being called?

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to