From c0e8a920939c83716de4a5b55f672e3c1ebcd00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 1 Dec 2011 18:28:39 +0100 Subject: [PATCH] Better documentation for Texture, mainly about required function calls. --- src/Texture.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Texture.h b/src/Texture.h index bc012fae5..f177d69a1 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -25,11 +25,14 @@ namespace Magnum { /** - * @brief Texture - * - * Template class for one- to three-dimensional textures. Recommended usage is - * via subclassing and setting texture data from e.g. constructor with - * setData(). +@brief Texture + +Template class for one- to three-dimensional textures. Recommended usage is via +subclassing and setting texture data from e.g. constructor with setData(). + +@attention Don't forget to call setMinificationFilter() and +setMagnificationFilter() after creating the texture, otherwise it will be +unusable. */ template class Texture { public: @@ -154,6 +157,9 @@ template class Texture { * * Sets filter used when the object pixel size is smaller than the * texture size. + * @attention This and setMagnificationFilter() must be called after + * creating the texture, otherwise it will be unusable. + * @see generateMipmap() */ inline void setMinificationFilter(Filter filter, Mipmap mipmap = BaseLevel) { bind(); @@ -167,6 +173,8 @@ template class Texture { * * Sets filter used when the object pixel size is larger than largest * texture size. + * @attention This and setMinificationFilter() must be called after + * creating the texture, otherwise it will be unusable. */ inline void setMagnificationFilter(Filter filter) { bind();