[osg-users] FrameBufferObject problems on OSG 2.9.11

Sergey Polischuk pol-ss at yandex.ru
Wed Apr 20 07:16:34 PDT 2011

Hi, Robert

I'm just curious, if this fix will resolve problems with freeing unused gl texture objects (f.e. if you call dirtyTextureObject on texture attached to camera and resize texture after that texture will create new gl texture object, but old is still valid, and it not released on its own with or with Texture::flushAllDeletedTextureObjects(...) call, at least on 2.9.9)?


20.04.2011, 15:52, "Robert Osfield" <robert.osfield at gmail.com>:
> 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.
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list