Hi Shuxing,

Problems with getting a graphics context will need investigating
further.  I only have Linux boxes here to test against so can't
directly help.  FYI, Under the linux exactly the same high level code
path is used, and the underlying mechanisms in osgViewer for getting
the graphics context are the same - its only the windowing specific
implementation that differers.  As a test could you try running on
another OS, such as Linux to see how you get on.

Robert.

On Jan 2, 2008 2:36 AM, Shuxing Xiao <[EMAIL PROTECTED]> wrote:
>
>
>
>
> 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
> 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