Browse Source

Better documentation for Texture, mainly about required function calls.

vectorfields
Vladimír Vondruš 15 years ago
parent
commit
c0e8a92093
  1. 18
      src/Texture.h

18
src/Texture.h

@ -25,11 +25,14 @@
namespace Magnum { namespace Magnum {
/** /**
* @brief Texture @brief Texture
*
* Template class for one- to three-dimensional textures. Recommended usage is Template class for one- to three-dimensional textures. Recommended usage is via
* via subclassing and setting texture data from e.g. constructor with subclassing and setting texture data from e.g. constructor with setData().
* setData().
@attention Don't forget to call setMinificationFilter() and
setMagnificationFilter() after creating the texture, otherwise it will be
unusable.
*/ */
template<size_t dimensions> class Texture { template<size_t dimensions> class Texture {
public: public:
@ -154,6 +157,9 @@ template<size_t dimensions> class Texture {
* *
* Sets filter used when the object pixel size is smaller than the * Sets filter used when the object pixel size is smaller than the
* texture size. * 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) { inline void setMinificationFilter(Filter filter, Mipmap mipmap = BaseLevel) {
bind(); bind();
@ -167,6 +173,8 @@ template<size_t dimensions> class Texture {
* *
* Sets filter used when the object pixel size is larger than largest * Sets filter used when the object pixel size is larger than largest
* texture size. * texture size.
* @attention This and setMinificationFilter() must be called after
* creating the texture, otherwise it will be unusable.
*/ */
inline void setMagnificationFilter(Filter filter) { inline void setMagnificationFilter(Filter filter) {
bind(); bind();

Loading…
Cancel
Save