Hello Igor,

In many places people say one should use the same code as there is in 
osgscreencapture which renders to a pbuffer is --pbuffer-only option is passed.
But the fact is that osgscreencapture doesn't work itself!

osgscreencapture.exe axes.osg --pbuffer-only 640 480

In another thread we established that there was a problem with using pbuffers on Windows in a multithreaded app. The call to viewer.realize() eventually calls makeCurrent on the context, which makes the context current for the main thread, and then when the GraphicsThread tries to call makeCurrent in its own thread it fails with the "The requested resource is in use" message.

I have just submitted a fix. A workaround is to add this after viewer.realize():

    viewer.stopThreading();
    gc->releaseContext();
    viewer.startThreading();

As for your laptop, I think it just doesn't support pbuffers. Check if it supports the WGL_ARB_pbuffer extension (you can see the supported extensions by setting OSG_NOTIFY_LEVEL=DEBUG and running osgviewer cow.osg, they will be printed near the start of the output when the context is created).

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               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

Reply via email to