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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user