diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index d8021bf78..afedd74b9 100644 --- a/src/AbstractTexture.h +++ b/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 diff --git a/src/CubeMapTexture.h b/src/CubeMapTexture.h index 0c7270520..6e8f9da46 100644 --- a/src/CubeMapTexture.h +++ b/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) { 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 inline CubeMapTexture* setImage(Coordinate coordinate, GLint level, InternalFormat internalFormat, Image* image) { DataHelper<2>::set(this, static_cast(coordinate), level, internalFormat, image); @@ -118,9 +126,15 @@ class CubeMapTexture: public AbstractTexture { } /** - * @copydoc Texture::setSubImage(GLint, const typename DimensionTraits::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 inline CubeMapTexture* setSubImage(Coordinate coordinate, GLint level, const Vector2i& offset, const Image* image) { DataHelper<2>::setSub(this, static_cast(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); diff --git a/src/CubeMapTextureArray.h b/src/CubeMapTextureArray.h index 15b95c030..00f3e574f 100644 --- a/src/CubeMapTextureArray.h +++ b/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) { 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 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 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); diff --git a/src/Texture.h b/src/Texture.h index 5e7000d7d..8b3738609 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -168,6 +168,7 @@ template class Texture: public AbstractTexture { * `Target::Texture3D` based on dimension count. * * Creates one OpenGL texture. + * @see @fn_gl{GenTextures} */ inline explicit Texture(Target target = DataHelper::target()): AbstractTexture(static_cast(target)) {} @@ -200,7 +201,7 @@ template 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)