Browse Source

Texture documentation reorganization.

The part similar for all AbstractTexture subclasses should be in
AbstractTexture itself, not anywhere else.
vectorfields
Vladimír Vondruš 14 years ago
parent
commit
f97a272fb6
  1. 12
      src/AbstractTexture.h
  2. 9
      src/CubeMapTexture.h
  3. 2
      src/CubeMapTextureArray.h
  4. 11
      src/Texture.h

12
src/AbstractTexture.h

@ -24,10 +24,20 @@
namespace Magnum { 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 See Texture, CubeMapTexture and CubeMapTextureArray documentation for more
information. information.
@todo Add glPixelStore encapsulation @todo Add glPixelStore encapsulation
*/ */
class MAGNUM_EXPORT AbstractTexture { class MAGNUM_EXPORT AbstractTexture {

9
src/CubeMapTexture.h

@ -26,9 +26,10 @@ namespace Magnum {
/** /**
@brief Cube map texture @brief Cube map texture
%Texture used mainly for environemnt maps, consisting of 6 square textures %Texture used mainly for environemnt maps. See AbstractTexture documentation
generating 6 faces of the cube as following. Note that all images must be for more information about usage. It consists of 6 square textures generating
turned upside down (+Y is top): 6 faces of the cube as following. Note that all images must be turned upside
down (+Y is top):
+----+ +----+
| -Y | | -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 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. 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 @see CubeMapTextureArray
*/ */

2
src/CubeMapTextureArray.h

@ -26,7 +26,7 @@ namespace Magnum {
/** /**
@brief Cube map texture array @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 When using cube map texture in the shader, use `samplerCubeArray`. Unlike
classic textures, coordinates for cube map textures is signed three-part classic textures, coordinates for cube map textures is signed three-part

11
src/Texture.h

@ -26,16 +26,9 @@ namespace Magnum {
/** /**
@brief %Texture @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` 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 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. to the shader - the only requirement is to have each texture in another layer.

Loading…
Cancel
Save