diff --git a/include/osg/Texture b/include/osg/Texture index 736548143..b380da6e5 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -599,6 +599,9 @@ class OSG_EXPORT Texture : public osg::StateAttribute /** Returns -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ int compareTexture(const Texture& rhs) const; + /** Returns -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ + int compareTextureObjects(const Texture& rhs) const; + typedef buffered_value TexParameterDirtyList; mutable TexParameterDirtyList _texParametersDirtyList; diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index 69acd8aaa..63a36113b 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -417,6 +417,17 @@ int Texture::compareTexture(const Texture& rhs) const return 0; } +int Texture::compareTextureObjects(const Texture& rhs) const +{ + if (_textureObjectBuffer.size()