HI Fabian,
<[email protected]> wrote:
> While you are on the subject, I send you a possible fix for the texture
> pool size problem. It compiles but I didn't validate it really works.
> You have a better understanding of the texture pool management, so maybe
> you can decide if the fix is correct.
The fix looks good, but the addition of the computeSize() made me
curious why it was needed, so I had a look a TextureProfile::set(..)
method, this didn't call computeSize() as it should have, which is why
you had to call computeSize() explicitly. I've now added the call to
computeSize() into the set method so now it should be possible to
simply do:
// keep previous size
unsigned int previousSize = _profile._size;
_profile.set(numMipmapLevels,internalFormat,width,height,depth,border);
if (_set)
{
_set->moveToSet(this,
_set->getParent()->getTextureObjectSet(_profile));
// Update texture pool size
_set->getParent()->getCurrTexturePoolSize() -= previousSize;
_set->getParent()->getCurrTexturePoolSize() += _profile._size;
}
I'm currently awaiting on a clean build before I check this fix in.
Cheers,
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org