Browse Source

Doc++

Not using @copydoc for Texture derivatives but linking manually instead.
It looks better and doesn't have mixed up irrelevant information.
pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
23d481afb7
  1. 9
      src/AbstractTexture.h
  2. 30
      src/CubeMapTexture.h
  3. 24
      src/CubeMapTextureArray.h
  4. 3
      src/Texture.h

9
src/AbstractTexture.h

@ -990,16 +990,11 @@ class MAGNUM_EXPORT AbstractTexture {
*/
static GLfloat maxSupportedAnisotropy();
/**
* @brief Constructor
* @param target Target, e.g. `GL_TEXTURE_2D`.
*
* Creates one OpenGL texture.
* @see @fn_gl{GenTextures}
*/
#ifndef DOXYGEN_GENERATING_OUTPUT
inline explicit AbstractTexture(GLenum target): _target(target) {
glGenTextures(1, &_id);
}
#endif
/**
* @brief Destructor

30
src/CubeMapTexture.h

@ -95,12 +95,14 @@ class CubeMapTexture: public AbstractTexture {
* @brief Constructor
*
* Creates one cube map OpenGL texture.
* @see @def_gl{TEXTURE_CUBE_MAP}
* @see @fn_gl{GenTextures} with @def_gl{TEXTURE_CUBE_MAP}
*/
inline explicit CubeMapTexture(): AbstractTexture(GL_TEXTURE_CUBE_MAP) {}
/**
* @copydoc Texture::setWrapping()
* @brief Set wrapping
*
* See Texture::setWrapping() for more information.
*/
inline CubeMapTexture* setWrapping(const Array3D<Wrapping>& wrapping) {
DataHelper<3>::setWrapping(this, wrapping);
@ -108,9 +110,15 @@ class CubeMapTexture: public AbstractTexture {
}
/**
* @copydoc Texture::setImage(GLint, InternalFormat, Image*)
* @param coordinate Coordinate
* @brief Set image data
* @param coordinate Coordinate
* @param level Mip level
* @param internalFormat Internal format
* @param image Image, ImageWrapper, BufferImage or
* Trade::ImageData of the same dimension count
* @return Pointer to self (for method chaining)
*
* See Texture::setImage() for more information.
*/
template<class Image> inline CubeMapTexture* setImage(Coordinate coordinate, GLint level, InternalFormat internalFormat, Image* image) {
DataHelper<2>::set(this, static_cast<GLenum>(coordinate), level, internalFormat, image);
@ -118,9 +126,15 @@ class CubeMapTexture: public AbstractTexture {
}
/**
* @copydoc Texture::setSubImage(GLint, const typename DimensionTraits<Dimensions, GLint>::VectorType&, Image*)
* @param coordinate Coordinate
* @brief Set image subdata
* @param coordinate Coordinate
* @param level Mip level
* @param offset Offset where to put data in the texture
* @param image Image, ImageWrapper, BufferImage or
* Trade::ImageData of the same or one less dimension count
* @return Pointer to self (for method chaining)
*
* See Texture::setSubImage() for more information.
*/
template<class Image> inline CubeMapTexture* setSubImage(Coordinate coordinate, GLint level, const Vector2i& offset, const Image* image) {
DataHelper<2>::setSub(this, static_cast<GLenum>(coordinate), level, offset, image);
@ -137,9 +151,7 @@ class CubeMapTexture: public AbstractTexture {
* @ref Coordinate "Coordinate::PositiveX" is `0` and so on, in the
* same order as in the enum.
*
* If running on OpenGL ES or extension @extension{ARB,invalidate_subdata}
* is not available, this function does nothing.
* @see invalidateImage(), @fn_gl{InvalidateTexSubImage}
* See Texture::invalidateSubImage() for more information.
*/
inline void invalidateSubImage(GLint level, const Vector3i& offset, const Vector3i& size) {
DataHelper<3>::invalidateSub(this, level, offset, size);

24
src/CubeMapTextureArray.h

@ -85,12 +85,14 @@ class CubeMapTextureArray: public AbstractTexture {
* @brief Constructor
*
* Creates one cube map OpenGL texture.
* @see @def_gl{TEXTURE_CUBE_MAP_ARRAY}
* @see @fn_gl{GenTextures} with @def_gl{TEXTURE_CUBE_MAP}
*/
inline explicit CubeMapTextureArray(): AbstractTexture(GL_TEXTURE_CUBE_MAP_ARRAY) {}
/**
* @copydoc Texture::setWrapping()
* @brief Set wrapping
*
* See Texture::setWrapping() for more information.
*/
inline CubeMapTextureArray* setWrapping(const Array3D<Wrapping>& wrapping) {
DataHelper<3>::setWrapping(this, wrapping);
@ -98,11 +100,18 @@ class CubeMapTextureArray: public AbstractTexture {
}
/**
* @copydoc Texture::setImage(GLint, InternalFormat, Image*)
* @brief Set image data
* @param level Mip level
* @param internalFormat Internal format
* @param image Image, ImageWrapper, BufferImage or
* Trade::ImageData of the same dimension count
* @return Pointer to self (for method chaining)
*
* Sets texture image data from three-dimensional image for all cube
* faces for all layers. Each group of 6 2D images is one cube map
* layer. The images are ordered the same way as Coordinate enum.
*
* See Texture::setImage() for more information.
*/
template<class T> inline CubeMapTextureArray* setImage(GLint level, InternalFormat internalFormat, T* image) {
DataHelper<3>::set(this, GL_TEXTURE_CUBE_MAP_ARRAY, level, internalFormat, image);
@ -118,13 +127,14 @@ class CubeMapTextureArray: public AbstractTexture {
* @return Pointer to self (for method chaining)
*
* Sets texture image subdata for more than one level/face at once.
* The image is not deleted afterwards.
*
* Z coordinate of @p offset specifies layer and cube map face. If
* you want to start at given face in layer *n*, you have to specify
* Z coordinate as @f$ 6n + i @f$, where i is face index as specified
* in Coordinate enum.
*
* See Texture::setSubImage() for more information.
*
* @see setSubImage(GLsizei, Coordinate, GLint, const Math::Vector<2, GLint>&, const Image*)
*/
template<class Image> inline CubeMapTextureArray* setSubImage(GLint level, const Vector3i& offset, const Image* image) {
@ -142,7 +152,7 @@ class CubeMapTextureArray: public AbstractTexture {
* Trade::ImageData2D
* @return Pointer to self (for method chaining)
*
* The image is not deleted afterwards.
* See Texture::setSubImage() for more information.
*
* @see setSubImage(GLint, const Math::Vector<3, GLint>&, const Image*)
*/
@ -161,9 +171,7 @@ class CubeMapTextureArray: public AbstractTexture {
* i.e. @ref Coordinate "Coordinate::PositiveX" is `0` and so on, in
* the same order as in the enum.
*
* If running on OpenGL ES or extension @extension{ARB,invalidate_subdata}
* is not available, this function does nothing.
* @see invalidateImage(), @fn_gl{InvalidateTexSubImage}
* See Texture::invalidateSubImage() for more information.
*/
inline void invalidateSubImage(GLint level, const Vector3i& offset, const Vector3i& size) {
DataHelper<3>::invalidateSub(this, level, offset, size);

3
src/Texture.h

@ -168,6 +168,7 @@ template<std::uint8_t dimensions> class Texture: public AbstractTexture {
* `Target::Texture3D` based on dimension count.
*
* Creates one OpenGL texture.
* @see @fn_gl{GenTextures}
*/
inline explicit Texture(Target target = DataHelper<Dimensions>::target()): AbstractTexture(static_cast<GLenum>(target)) {}
@ -200,7 +201,7 @@ template<std::uint8_t dimensions> class Texture: public AbstractTexture {
/**
* @brief Set image data
* @param level Mip level
* @param internalFormat Internal texture format
* @param internalFormat Internal format
* @param image Image, ImageWrapper, BufferImage or
* Trade::ImageData of the same dimension count
* @return Pointer to self (for method chaining)

Loading…
Cancel
Save