Hi Anish,
Good catch, this looks like a bug to me. I am currently testing out
the follow fix for this bug.
Index: src/osg/BufferObject.cpp
===================================================================
--- src/osg/BufferObject.cpp (revision 13102)
+++ src/osg/BufferObject.cpp (working copy)
@@ -642,7 +642,6 @@
// update the number of active and orphaned GLBufferObjects
_parent->getNumberOrphanedGLBufferObjects() -= numDiscarded;
- _parent->getNumberActiveGLBufferObjects() += numDiscarded;
_parent->getNumberDeleted() += numDiscarded;
@@ -703,7 +702,6 @@
// update the number of active and orphaned TextureOjects
_parent->getNumberOrphanedGLBufferObjects() -= numDeleted;
- _parent->getNumberActiveGLBufferObjects() += numDeleted;
_parent->getNumberDeleted() += numDeleted;
availableTime -= timer.elapsedTime();
If all goes well I'll check this into svn/trunk.
Cheers,
Robert.
On 24 July 2012 05:26, Anish Thomas <[email protected]> wrote:
> Hi,
>
> While trying to understand the inner workings of the buffer object management
> I found this:
>
> void GLBufferObjectSet::discardAllDeletedGLBufferObjects()
> {
> .
> .
> _parent->getNumberActiveGLBufferObjects() += numDiscarded;
>
> Line no 645 in \src\osg\BufferObject.cpp in v3.1.2
>
> Why would the 'active number' get incremented when objects are deleted? We
> wouldn't need to modify the active number here at all. The management of
> textures doesn't seem to suffer from this bug.
>
>
> Thank you!
>
> Cheers,
> Anish
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=49008#49008
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org