Hi,

the appended patch fixes the problem reported on http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-January/006110.html.

Regards
Ralf

Index: src/osgViewer/GraphicsWindowWin32.cpp
===================================================================
--- src/osgViewer/GraphicsWindowWin32.cpp       (revision 8840)
+++ src/osgViewer/GraphicsWindowWin32.cpp       (working copy)
@@ -1140,7 +1140,13 @@
         //
         // Create the OpenGL rendering context associated with this window
         //
-
+        if (!setPixelFormat())
+        {
+            reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to 
set the inherited window pixel format", _traits->screenNum, ::GetLastError());
+            _hdc  = 0;
+            _hwnd = 0;
+            return false;
+        }
         _hglrc = ::wglCreateContext(_hdc);
         if (_hglrc==0)
         {
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to