diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index 00f94856c..773958613 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -24,10 +24,20 @@ namespace Magnum { /** -@brief Non-templated base for one-, two- or three-dimensional textures. +@brief Base for textures + +@attention Don't forget to call @ref Texture::setWrapping() "setWrapping()", +setMinificationFilter() and setMagnificationFilter() after creating the +texture, otherwise the texture will be incomplete. If you specified mipmap +filtering in setMinificationFilter(), be sure to also either explicitly set +all mip levels or call generateMipmap(). + +The texture is bound via bind() and setting texture uniform on the shader to the +texture (see AbstractShaderProgram::setUniform(GLint, const AbstractTexture*)). See Texture, CubeMapTexture and CubeMapTextureArray documentation for more information. + @todo Add glPixelStore encapsulation */ class MAGNUM_EXPORT AbstractTexture { diff --git a/src/CubeMapTexture.h b/src/CubeMapTexture.h index e655ae458..8db13f20a 100644 --- a/src/CubeMapTexture.h +++ b/src/CubeMapTexture.h @@ -26,9 +26,10 @@ namespace Magnum { /** @brief Cube map texture -%Texture used mainly for environemnt maps, consisting of 6 square textures -generating 6 faces of the cube as following. Note that all images must be -turned upside down (+Y is top): +%Texture used mainly for environemnt maps. See AbstractTexture documentation +for more information about usage. It consists of 6 square textures generating +6 faces of the cube as following. Note that all images must be turned upside +down (+Y is top): +----+ | -Y | @@ -42,7 +43,7 @@ When using cube map texture in the shader, use `samplerCube`. Unlike classic textures, coordinates for cube map textures is signed three-part vector from the center of the cube, which intersects one of the six sides of the cube map. -See Texture documentation for more information about usage. +See AbstractTexture documentation for more information about usage. @see CubeMapTextureArray */ diff --git a/src/CubeMapTextureArray.h b/src/CubeMapTextureArray.h index 4c5eaefc0..e9f09de81 100644 --- a/src/CubeMapTextureArray.h +++ b/src/CubeMapTextureArray.h @@ -26,7 +26,7 @@ namespace Magnum { /** @brief Cube map texture array -For information about usage, see CubeMapTexture class documentation. +For information about usage, see CubeMapTexture documentation. When using cube map texture in the shader, use `samplerCubeArray`. Unlike classic textures, coordinates for cube map textures is signed three-part diff --git a/src/Texture.h b/src/Texture.h index 6bfe57989..ae36d15c0 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -26,16 +26,9 @@ namespace Magnum { /** @brief %Texture -Template class for one- to three-dimensional textures. +Template class for one- to three-dimensional textures. See AbstractTexture +documentation for more information about usage. -@attention Don't forget to call setWrapping(), setMinificationFilter() and -setMagnificationFilter() after creating the texture, otherwise the texture -will be incomplete. If you specified mipmap filtering in -setMinificationFilter(), be sure to also either explicitly set all mip levels -or call generateMipmap(). - -The texture is bound via bind() and setting texture uniform on the shader to the -texture (see AbstractShaderProgram::setUniform(GLint, const AbstractTexture*)). In shader, the texture is used via `sampler1D`, `sampler2D` or `sampler3D` depending on dimension count. Note that you can have more than one texture bound to the shader - the only requirement is to have each texture in another layer.