Ok I was able to get it working by getting the resolved fbo using the
RenderStage::getMultisampleResolveFramebufferObject method. Here a subset of
my code in the draw callback:


  osgViewer::Renderer * renderer =
static_cast<osgViewer::Renderer*>(renderInfo.getCurrentCamera()->getRenderer());

    osg::FrameBufferObject *fbo=NULL;


fbo=renderer->getSceneView(0)->getRenderStage()->getMultisampleResolveFramebufferObject();

    // Bind the fbo to be read
    fbo->apply(state,osg::FrameBufferObject::READ_FRAMEBUFFER);

    // Specify a color buffer as the source for the subsequent call of
glReadPixel
    glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);

  float* tempbuf32Bits = new float[WIDTH*HEIGHT];
 glReadPixels(0, 0, WIDTH, HEIGHT, GL_RED, GL_FLOAT, tempbuf32Bits);


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

Reply via email to