Fixed texture optimization problem associated with mixing already compiled scene graphs - resulting

in incorrect texture assignment.  Solution was to a compareTextureObjects() test to the Texture*::compare(..) method that
the osgUtil::Optimizer::StateSetVisitor uses to determine uniqueness.
This commit is contained in:
Robert Osfield
2006-08-14 19:42:22 +00:00
parent fb27b27e5e
commit be60b32add
7 changed files with 73 additions and 0 deletions

View File

@@ -99,6 +99,17 @@ int TextureRectangle::compare(const StateAttribute& sa) const
}
}
if (!_image && !rhs._image)
{
// no image attached to either Texture2D
// but could these textures already be downloaded?
// check the _textureObjectBuffer to see if they have been
// downloaded
int result = compareTextureObjects(rhs);
if (result!=0) return result;
}
int result = compareTexture(rhs);
if (result!=0) return result;