Added new buffered_value template class which encapsulates a std::vector but
initializes the array to the number of graphics contexts, and automatically expands the array when indices outside the current size are required. Added new osg::Texture::Extensions nested class to handle extensions on a per context basis.
This commit is contained in:
@@ -146,23 +146,7 @@ int TextureCubeMap::compare(const StateAttribute& sa) const
|
||||
|
||||
void TextureCubeMap::setImage( Face face, Image* image)
|
||||
{
|
||||
// Quick and dirty implementation committed by ABJ.
|
||||
if (face == 0)
|
||||
{
|
||||
// delete old texture objects.
|
||||
for(TextureNameList::iterator itr=_handleList.begin();
|
||||
itr!=_handleList.end();
|
||||
++itr)
|
||||
{
|
||||
if (*itr != 0)
|
||||
{
|
||||
// contact global texture object handler to delete texture objects
|
||||
// in appropriate context.
|
||||
// glDeleteTextures( 1L, (const GLuint *)itr );
|
||||
*itr = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
dirtyTextureObject();
|
||||
_images[face] = image;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user