Hi OSG folks,

I have a problem on saving screen image. I’m using osg2.0 compositeViewer
and a slave camera to catch screen shot generated by master camera, through
a snap image post draw call back deriving from osg::Camera::DrawCallback, in
a wxWidgets environment. It works well for FBO. Unfortunately it doesn’t
work (black empty image) for some graphic card not supporting FBO. When I
change to osg::Camera::PIXEL_BUFFER or osg::Camera::PIXEL_BUFFER_RTT with
slave camera‘s setRenderTargetImplementation it causes a crash at
Renderstage::draw because callingContext is NULL. Here is the callback:

            osg25-osgd.dll!osg::GraphicsContext::releaseContext()  Line 527
+ 0x3 bytes         C++
>          osg25-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo &
renderInfo={...}, osgUtil::RenderLeaf * & previous=0x00000000)  Line 854 +
0xb bytes    C++
            osg25-osgUtild.dll!osgUtil::SceneView::draw()  Line 1454 + 0x34
bytes       C++
            osg25-osgViewerd.dll!osgViewer::Renderer::cull_draw()  Line 506
+ 0xf bytes          C++
            osg25-osgViewerd.dll!osgViewer::Renderer::operator()(osg::Graphi
csContext * context=0x0952c5d0)  Line 569          C++
            osg25-osgd.dll!osg::GraphicsContext::runOperations()  Line 671 +
0x33 bytes        C++
            osg25-osgViewerd.dll!osgViewer::ViewerBase::renderingTraversals(
)  Line 651 + 0x15 bytes            C++
            osg25-osgViewerd.dll!osgViewer::ViewerBase::frame(double
simulationTime=1.7976931348623157e+308)  Line 578 + 0xf bytes         C++

By checking the mail list I found the bug was reported before but I cannot
find the solution. Any progress or advice on this problem?

Also I found Robert ever suggest to use a fallback mechanism for PBUFEER,
how it works? Anyone has ever successfully tried that?

Thanks,

Jansen
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to