Added support s/getImage(uint i) and getNumImages().

This commit is contained in:
Robert Osfield
2004-07-27 10:11:45 +00:00
parent a4f93740d1
commit bb5576bef8
14 changed files with 91 additions and 35 deletions

View File

@@ -168,18 +168,12 @@ void Texture3D::apply(State& state) const
// update the modified tag to show that it is upto date.
getModifiedTag(contextID) = _image->getModifiedTag();
if (_unrefImageDataAfterApply && areAllTextureObjectsLoaded())
if (_unrefImageDataAfterApply && areAllTextureObjectsLoaded() && getDataVariance()==STATIC)
{
Texture3D* non_const_this = const_cast<Texture3D*>(this);
non_const_this->_image = 0;
}
// in theory the following line is redundent, but in practice
// have found that the first frame drawn doesn't apply the textures
// unless a second bind is called?!!
// perhaps it is the first glBind which is not required...
//glBindTexture( GL_TEXTURE_3D, handle );
}
else
{