[osg-users] FrameBufferObject problems on OSG 2.9.11

Robert Osfield robert.osfield at gmail.com
Wed Apr 20 04:52:44 PDT 2011

Hi Paul,

On Wed, Apr 20, 2011 at 10:48 AM, Robert Osfield
<robert.osfield at gmail.com> wrote:
> There are number of changes that address different issues in
> osgViewer::Renderer so I'll will need carefully revert the changes to
> pick out the cause of the problem.  The difficulty in tracking down
> this problem is due to the symptoms of the problem being quite removed
> from the cause.   Right now I think the most likely cause of the
> problem is the changes to how the ICO and the DatabasePager are
> managed in the recent version of Renderer.cpp.

It turns out that the problem wasn't even the changes to Renderer.cpp,
rather improvements to the Renderer reveal a deeper problem with
release of GL objects in the cached rendering backend.  This problem
will have
been lurking for a long time, so I'm a bit suprised we haven't traked
it down before, it's possible the usage combination of using the
render to texture cameras + fbo's in an application that creates and
destroys a series of contexts hasn't been stressed too much in the
past.  It might also be that problems have happened, just we didn't
correctly pick up on the cause.  Either way, the problem is now solved

What I have done is added releaseGLObjects(State*) implementations in
the FrameBufferObject, RenderBuffer, RenderStageCache, RenderStage and
RenderBin.  This should have been there in the first
place but we clearly overlooked these when the
osg::Object::releaseGLObjects(State*) functionality was introduced a
few years back.

An svn update will fix the problem with the incorrect rendering and
warnings to the console for the example provided, and I suspect a few
other apps out in the wild that have seen problems like this but never
nailed what was the cause.


More information about the osg-users mailing list