So I've found the problem with the FBOs and am in look of a solution. The problem is, is that ios uses framebuffer objects for everything including the main views rendering. The current setup uses the swapbufferes method to Display the renderbuffer then ensure the view framebuffer is bound with glBindFrameBuffer. The problem comes with the fact that swapbuffers is called at the end of a frame but the rtt fbo is being bound at the start, meaning when the normal camera starts to render the rtt fbo is still bound. An output is below
START FRAME //just before a call to viewer->frame IOS MAKE CURRENT //a call to makeCurrentImplementation OSG BIND FRAMEBUFFER //the rtt fbo is bound with glBindFrameBuffer IOS BIND VIEWER RENDERBUFFER //the swapBuffers method is called and the ios framebuffer renderbuffer is bound for display IOS PRESENT VIEWER RENDERBUFFER //display IOS BIND VIEWER FRAMEBUFFER //ensure ios framebuffer bound END FRAME So as you can see from the above we need to rebind the ios view framebuffer after the RTT FBO is finished with. I know the underlying features work as changing the rtt camera to a post render camera works but acts a little crazy. Anyhow, I guess my question would be, is their any signal to the graphicsContext (the iphoneviewer) once either a different FBO is finished with or that it the default camera/owner of the contexts is about to start rendering i.e. a makeFrameBufferCurrent, although i guess other platforms don't need it. Cheers Tom PS I did have a small hunch that a default buffer might be being bound i.e. glBindFramebuffer(GL_FRAMEBUFFER, 0); but can only find one instance and it's not called. If this was happening I have a feeling on IOS the default/first buffer is actually 1. Could be important
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

