Hi,

Texture compilation ==

Code:

Texture2D::apply(...)
{
   texture object -> bind

   Texture::applyTexImage2D_load(...)
   {
      pbo->bind

      glTexImage(. . ., image offset in buffer object)

      if (pbo->getCopyDataAndReleaseGLBufferObject())
      {
         pbo->unbind()
         pbo->releaseGLObject()
      }

   }

   if (unref image data after apply)
   {
      _image = 0;
   }
}




The GL buffer object is released before the image is unreferenced.
In order to release the GL buffer object implicitly when the reference count of 
the OSG buffer object reach 0, the member "CopyDataAndReleaseGLBufferObject" 
has to be false.

The user may not want this behaviour. It can be a parameter of the pager (like 
"assignPBOToImages").

Thank you!

Cheers,
Lionel

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





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

Reply via email to