diff --git a/src/CubeMapTexture.h b/src/CubeMapTexture.h index 5b7ad2803..ce5d61c2b 100644 --- a/src/CubeMapTexture.h +++ b/src/CubeMapTexture.h @@ -64,18 +64,18 @@ class CubeMapTexture: public Texture2D { */ inline CubeMapTexture(GLint layer = 0): Texture(layer, Target::CubeMap) {} - template inline void setData(GLint mipLevel, InternalFormat internalFormat, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) = delete; + template inline void setData(GLint mipLevel, InternalFormat internalFormat, const Math::Vector& dimensions, ColorFormat colorFormat, const T* data) = delete; template void setData(GLint mipLevel, InternalFormat internalFormat, T* image) = delete; - template inline void setSubData(GLint mipLevel, const Math::Vector& offset, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) = delete; + template inline void setSubData(GLint mipLevel, const Math::Vector& offset, const Math::Vector& dimensions, ColorFormat colorFormat, const T* data) = delete; template void setSubData(GLint mipLevel, const Math::Vector& offset, T* image) = delete; /** * @copydoc Texture::setData(GLint, InternalFormat, const Math::Vector&, ColorFormat, const T*) * @param coordinate Coordinate */ - template inline void setData(Coordinate coordinate, GLint mipLevel, InternalFormat internalFormat, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) { + template inline void setData(Coordinate coordinate, GLint mipLevel, InternalFormat internalFormat, const Math::Vector& dimensions, ColorFormat colorFormat, const T* data) { bind(); - DataHelper::set(static_cast(coordinate), mipLevel, internalFormat, _dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); + DataHelper::set(static_cast(coordinate), mipLevel, internalFormat, dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); } /** @@ -91,9 +91,9 @@ class CubeMapTexture: public Texture2D { * @copydoc Texture::setSubData(GLint, const Math::Vector&, const Math::Vector&, ColorFormat, const T*) * @param coordinate Coordinate */ - template inline void setSubData(Coordinate coordinate, GLint mipLevel, const Math::Vector& offset, const Math::Vector& _dimensions, ColorFormat colorFormat, const T* data) { + template inline void setSubData(Coordinate coordinate, GLint mipLevel, const Math::Vector& offset, const Math::Vector& dimensions, ColorFormat colorFormat, const T* data) { bind(); - DataHelper::setSub(static_cast(coordinate), mipLevel, offset, _dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); + DataHelper::setSub(static_cast(coordinate), mipLevel, offset, dimensions, colorFormat, TypeTraits::TextureType>::glType(), data); } /** diff --git a/src/Texture.h b/src/Texture.h index eef0a9474..3ed51d670 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -25,9 +25,6 @@ namespace Magnum { /** @brief %Texture -@tparam dimensions %Texture dimension count -@tparam target %Target. If not set, target is based on dimension - count (`Target::Texture1D`, `Target::Texture2D` or `Target::Texture3D`). Template class for one- to three-dimensional textures. @@ -51,15 +48,15 @@ don't support mipmapping and repeating wrapping modes, see @ref Texture::Filter "Filter", @ref Texture::Mipmap "Mipmap" and generateMipmap() documentation for more information. */ -template class Texture: public AbstractTexture { +template class Texture: public AbstractTexture { public: - static const size_t Dimensions = dimensions; /**< @brief %Texture dimension count */ + static const size_t Dimensions = textureDimensions; /**< @brief %Texture dimension count */ typedef typename DataHelper::Target Target; /**< @brief %Texture target */ /** * @brief Constructor - * @param layer %Texture layer (number between 0 and 31) - * @param target %Texture target + * @param layer %Texture layer (number between 0 and 31) + * @param target %Texture target * * Creates one OpenGL texture. */ @@ -70,7 +67,7 @@ template class Texture: public AbstractTexture { /** * @brief Set wrapping - * @param wrapping Wrapping type for all texture dimensions + * @param wrapping Wrapping type for all texture dimensions * * Sets wrapping type for coordinates out of range (0, 1) for normal * textures and (0, textureSizeInGivenDirection-1) for rectangle @@ -85,16 +82,16 @@ template class Texture: public AbstractTexture { * @brief Set texture data * @param mipLevel Mip level * @param internalFormat Internal texture format - * @param _dimensions %Texture dimensions + * @param dimensions %Texture dimensions * @param colorFormat Color format of passed data. Data size per * color channel is detected from format of passed data array. * @param data %Texture data * * Sets texture from given data. The data are not deleted afterwards. */ - 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); } /** @@ -116,7 +113,7 @@ template class Texture: public AbstractTexture { * @brief Set texture subdata * @param mipLevel Mip level * @param offset Offset where to put data in the texture - * @param _dimensions %Texture dimensions + * @param dimensions %Texture dimensions * @param colorFormat Color format of passed data. Data size per * color channel is detected from format of passed data array. * @param data %Texture data @@ -124,9 +121,9 @@ template class Texture: public AbstractTexture { * Sets texture subdata from given data. The data are not deleted * afterwards. */ - 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); } /**