Hi Fabian,

I have now checked in the changes to include/osg/Texture
src/osg/Texture.cpp to correct the setAllocated(..)'s handling of the
texture pool size.

Cheers,
Robert.

On Thu, Nov 4, 2010 at 5:41 PM, Robert Osfield <[email protected]> wrote:
> 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

Reply via email to