diff --git a/include/osg/Texture2D b/include/osg/Texture2D index ea409764c..d06baacc3 100644 --- a/include/osg/Texture2D +++ b/include/osg/Texture2D @@ -135,10 +135,6 @@ class OSG_EXPORT Texture2D : public Texture void allocateMipmap(State& state) const; - /** It's not ideal that _image is mutable, but it's required since - * Image::ensureDimensionsArePowerOfTwo() can only be called in a - * valid OpenGL context, and therefore within Texture::apply, which - * is const. */ ref_ptr _image; /** Subloaded images can have different texture and image sizes. */ diff --git a/include/osg/TextureRectangle b/include/osg/TextureRectangle index b9d50aaa6..7afc73296 100644 --- a/include/osg/TextureRectangle +++ b/include/osg/TextureRectangle @@ -134,11 +134,7 @@ class OSG_EXPORT TextureRectangle : public Texture void applyTexImage_load(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight) const; void applyTexImage_subload(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight, GLint& inInternalFormat) const; - // not ideal that _image is mutable, but it's required since - // Image::ensureDimensionsArePowerOfTwo() can only be called - // in a valid OpenGL context, and therefore within an Texture::apply - // which is const... - mutable ref_ptr _image; + ref_ptr _image; // subloaded images can have different texture and image sizes. mutable GLsizei _textureWidth, _textureHeight;