diff --git a/src/AbstractTexture.cpp b/src/AbstractTexture.cpp index f6872fa59..6693f37da 100644 --- a/src/AbstractTexture.cpp +++ b/src/AbstractTexture.cpp @@ -435,7 +435,7 @@ void AbstractTexture::invalidateSubImplementationARB(GLint level, const Vector3i #ifndef DOXYGEN_GENERATING_OUTPUT #ifndef MAGNUM_TARGET_GLES2 namespace Implementation { - template GLvoid* ImageHelper>::dataOrPixelUnpackBuffer(BufferImage* image) { + template const GLvoid* ImageHelper>::dataOrPixelUnpackBuffer(BufferImage* image) { image->buffer()->bind(Buffer::Target::PixelUnpack); return nullptr; } diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index 7bdf8ab78..9d7c8a118 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -1278,7 +1278,7 @@ class MAGNUM_EXPORT AbstractTexture { #ifndef DOXYGEN_GENERATING_OUTPUT namespace Implementation { template struct ImageHelper { - inline static GLvoid* dataOrPixelUnpackBuffer(Image* image) { + inline static const GLvoid* dataOrPixelUnpackBuffer(Image* image) { #ifndef MAGNUM_TARGET_GLES2 Buffer::unbind(Buffer::Target::PixelUnpack); #endif @@ -1288,7 +1288,7 @@ namespace Implementation { #ifndef MAGNUM_TARGET_GLES2 template struct MAGNUM_EXPORT ImageHelper> { - static GLvoid* dataOrPixelUnpackBuffer(BufferImage* image); + static const GLvoid* dataOrPixelUnpackBuffer(BufferImage* image); }; #endif }