From a21e3ea02e4f34cf88c1fddcb88d415279b2597c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 7 May 2012 23:48:46 +0200 Subject: [PATCH] Improved documentation for texture completeness. (Almost) nobody will notice that in function documentation, so it's now only in class documentation. --- src/AbstractTexture.h | 6 ------ src/Texture.h | 7 +++---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index 5f9ed2fcc..d0ae91bad 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -468,9 +468,6 @@ class MAGNUM_EXPORT AbstractTexture { * * Sets filter used when the object pixel size is smaller than the * texture size. - * @attention This, @ref Texture::setWrapping() "setWrapping()" and - * setMagnificationFilter() must be called after creating the texture, - * otherwise the texture will be incomplete. * @attention For rectangle textures only some modes are supported, * see @ref AbstractTexture::Filter "Filter" and * @ref AbstractTexture::Mipmap "Mipmap" documentation for more @@ -484,9 +481,6 @@ class MAGNUM_EXPORT AbstractTexture { * * Sets filter used when the object pixel size is larger than largest * texture size. - * @attention This, @ref Texture::setWrapping() "setWrapping()" and - * setMinificationFilter() must be called after creating the texture, - * otherwise the texture will be incomplete. */ inline void setMagnificationFilter(Filter filter) { bind(); diff --git a/src/Texture.h b/src/Texture.h index a5b5ab198..a3134b792 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -30,7 +30,9 @@ Template class for one- to three-dimensional textures. @attention Don't forget to call setWrapping(), setMinificationFilter() and setMagnificationFilter() after creating the texture, otherwise the texture -will be incomplete. +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*)). @@ -113,9 +115,6 @@ template class Texture: public AbstractTexture { * Sets wrapping type for coordinates out of range (0, 1) for normal * textures and (0, textureSizeInGivenDirection-1) for rectangle * textures. - * @attention This, setMinificationFilter() and - * setMagnificationFilter() must be called after creating the texture, - * otherwise the texture will be incomplete. * @attention For rectangle textures only some modes are supported, * see @ref AbstractTexture::Wrapping "Wrapping" documentation for * more information.