Hi, all:
First of all,
Happy New Year and Good Luck in 2008.
Then there's my problem:
I was immigrating from osg 2.0 to osg 2.3 with the new QOSGWidget which is
derived directly from Qwidget but QGLWidget, and my programming environment
is Windows 2003 server, visual studio 2005, during the initialization of the
programming, it crashed.
Windows Error #2000: [Screen #0] GraphicsWindowWin32::setWindow() - Unable
to create OpenGL rendering context. Reason: The pixel format is invalid.
I tracked down, and I found that the creation of graphics context failed,
and the stack is like following:
if (s_WindowingSystemInterface.valid())
return s_WindowingSystemInterface->createGraphicsContext(traits);
in
osg::ref_ptr<osg::GraphicsContext> gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
and I checked that my s_WindowingSystemInterface is surely
Win32WindowingSystem , but the GraphicsWindowWin32::setWindow( HWND handle )
and the osg::GraphicsContext* createGraphicsContext(
osg::GraphicsContext::Traits* traits ) is never called(the breakpoints
didn't caught them).
I don't know why this happens, hope someone can give me some hint.
I want gain some performance by immigrating to the new QOSGWidget, but this
problem stuck me for really a long time.
Shuxing Xiao
2008-1-1
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org