Hi Robert,

Well, I was hoping to be able to do the integration without modifications to 
OSG. If such modifications proves to be necessary, then I agree with Jan that 
we should wait for v0.7 to see if that integration is easier. It seems 
unnecessary to change OSG for a problem that may disappear in later Oculus SDK 
versions.

But I am happy to report that I have a working, flicker free solution. Although 
I had to make a rather cumbersome call inside my pre draw camera callback to 
get the FBO handle:


Code:

osg::Camera* camera = renderInfo.getCurrentCamera();
osgViewer::Renderer *camRenderer = 
(dynamic_cast<osgViewer::Renderer*>(camera->getRenderer()));
if (camRenderer != NULL) {
  osgUtil::SceneView* sceneView = camRenderer->getSceneView(0);
  if (sceneView != NULL) {
    osgUtil::RenderStage* renderStage = sceneView->getRenderStage();
    if (renderStage != NULL) {
      osg::FrameBufferObject* fbo = renderStage->getFrameBufferObject();
      GLuint fboHandle = fbo->getHandle(ctx);
    }
  }
}




This also forced me to link with osgUtil. I don't know if there is a simpler 
way of getting the FBO handle, which does not involve osgUtil?

Best regards

Björn

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64683#64683





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

Reply via email to