Fixed the TextureObject's + GLBufferObject reassignment to a new set.

Disabled the unref after apply for a Texture classes when the texture pool is enabled
This commit is contained in:
Robert Osfield
2009-10-06 13:42:12 +00:00
parent e6a1429335
commit 69557c060b
9 changed files with 68 additions and 34 deletions

View File

@@ -190,7 +190,7 @@ void Texture1D::apply(State& state) const
_textureObjectBuffer[contextID] = textureObject;
if (_unrefImageDataAfterApply && areAllTextureObjectsLoaded() && _image->getDataVariance()==STATIC)
if (state.getMaxTexturePoolSize()==0 && _unrefImageDataAfterApply && areAllTextureObjectsLoaded() && _image->getDataVariance()==STATIC)
{
Texture1D* non_const_this = const_cast<Texture1D*>(this);
non_const_this->_image = 0;