diff --git a/src/osg/Texture2D.cpp b/src/osg/Texture2D.cpp index 950bc9061..79778e775 100644 --- a/src/osg/Texture2D.cpp +++ b/src/osg/Texture2D.cpp @@ -254,7 +254,7 @@ void Texture2D::apply(State& state) const // compute the dimensions of the texture. computeRequiredTextureDimensions(state,*image,_textureWidth, _textureHeight, _numMipmapLevels); - GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(_image) : 0; + GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(_image.get()) : 0; textureObject = generateAndAssignTextureObject(contextID, GL_TEXTURE_2D, _numMipmapLevels, texStorageSizedInternalFormat!=0 ? texStorageSizedInternalFormat : _internalFormat, _textureWidth, _textureHeight, 1, _borderWidth); diff --git a/src/osg/Texture2DArray.cpp b/src/osg/Texture2DArray.cpp index 0778d3b10..23178e91b 100644 --- a/src/osg/Texture2DArray.cpp +++ b/src/osg/Texture2DArray.cpp @@ -336,7 +336,7 @@ void Texture2DArray::apply(State& state) const // compute the internal texture format, this set the _internalFormat to an appropriate value. computeInternalFormat(); - GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(_images[0]) : 0; + GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(_images[0].get()) : 0; // compute the dimensions of the texture. computeRequiredTextureDimensions(state,*_images[0],_textureWidth, _textureHeight, _numMipmapLevels); diff --git a/src/osg/TextureCubeMap.cpp b/src/osg/TextureCubeMap.cpp index 3c4134fe3..e99f0c44d 100644 --- a/src/osg/TextureCubeMap.cpp +++ b/src/osg/TextureCubeMap.cpp @@ -293,7 +293,7 @@ void TextureCubeMap::apply(State& state) const _textureWidth = _textureHeight = minimum( _textureWidth , _textureHeight ); } - GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(_images[0]) : 0; + GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(_images[0].get()) : 0; textureObject = generateAndAssignTextureObject( contextID, GL_TEXTURE_CUBE_MAP, _numMipmapLevels, diff --git a/src/osg/TextureRectangle.cpp b/src/osg/TextureRectangle.cpp index 27c5dfff2..47d81d794 100644 --- a/src/osg/TextureRectangle.cpp +++ b/src/osg/TextureRectangle.cpp @@ -240,7 +240,7 @@ void TextureRectangle::apply(State& state) const computeInternalFormat(); //get sizedInternalFormat if TexStorage available - GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(image) : 0; + GLenum texStorageSizedInternalFormat = extensions->isTextureStorageEnabled && (_borderWidth==0) ? selectSizedInternalFormat(image.get()) : 0; _textureWidth = image->s(); _textureHeight = image->t();