diff --git a/src/Texture.cpp b/src/Texture.cpp index 1bb9cf0c7..7a027da16 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -17,7 +17,7 @@ namespace Magnum { -template void Texture::setWrapping(const Math::Vector& wrapping) { +template void Texture::setWrapping(const Math::Vector& wrapping) { bind(); for(int i = 0; i != dimensions; ++i) { /* Repeat wrap modes are not available on rectangle textures. */ diff --git a/src/Texture.h b/src/Texture.h index a4da76af3..8998d55a0 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -61,7 +61,7 @@ template class Texture: public AbstractTexture { * * Creates one OpenGL texture. */ - inline Texture(GLint layer = 0, GLenum target = DataHelper::target()): AbstractTexture(layer, target) {} + inline Texture(GLint layer = 0, GLenum target = DataHelper::target()): AbstractTexture(layer, target) {} /** * @brief Set wrapping @@ -72,7 +72,7 @@ template class Texture: public AbstractTexture { * textures. Note that for rectangle textures repeating wrapping modes * are unavailable. */ - void setWrapping(const Math::Vector& wrapping); + void setWrapping(const Math::Vector& wrapping); /** * @brief Set texture data @@ -83,9 +83,9 @@ template class Texture: public AbstractTexture { * color channel is detected from format of passed data array. * @param data %Texture data */ - template inline void setData(GLint mipLevel, InternalFormat internalFormat, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) { + template inline void setData(GLint mipLevel, InternalFormat internalFormat, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) { bind(); - DataHelper::set(target, mipLevel, internalFormat, _dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); + DataHelper::set(target, mipLevel, internalFormat, _dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); unbind(); } @@ -110,9 +110,9 @@ template class Texture: public AbstractTexture { * color channel is detected from format of passed data array. * @param data %Texture data */ - template inline void setSubData(GLint mipLevel, const Math::Vector& offset, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) { + template inline void setSubData(GLint mipLevel, const Math::Vector& offset, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) { bind(); - DataHelper::setSub(target, mipLevel, offset, _dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); + DataHelper::setSub(target, mipLevel, offset, _dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); unbind(); } @@ -124,7 +124,7 @@ template class Texture: public AbstractTexture { */ inline void setSubData(GLint mipLevel, const Math::Vector& offset, const Image* image) { bind(); - DataHelper::setSub(target, mipLevel, offset, image->dimensions(), image->colorFormat(), image->type(), image->data()); + DataHelper::setSub(target, mipLevel, offset, image->dimensions(), image->colorFormat(), image->type(), image->data()); unbind(); } };