#include <VisTexture2D.hpp>
Public Member Functions | |
| Texture2D (const char *path, GLenum wrapS=GL_REPEAT, GLenum wrapT=GL_REPEAT, GLenum magFilter=GL_LINEAR, GLenum minFilter=GL_LINEAR_MIPMAP_LINEAR) | |
| Texture2D (V2i size, Color4f color=Color4f(0.0), GLenum wrapS=GL_REPEAT, GLenum wrapT=GL_REPEAT, GLenum magFilter=GL_LINEAR, GLenum minFilter=GL_LINEAR_MIPMAP_LINEAR) | |
| Texture2D (V2i size, Color4f *pixels, GLenum wrapS=GL_REPEAT, GLenum wrapT=GL_REPEAT, GLenum magFilter=GL_LINEAR, GLenum minFilter=GL_LINEAR_MIPMAP_LINEAR) | |
| V2i | get_size () |
| Returns the size of the texture. | |
| Color4f * | get_pixels () |
| Returns a reference to the pixel data. | |
| void | send_to_GPU () |
| void | build_mipmaps () |
| void | bind (GLuint texUnit) |
| GLuint | get_texture_name () |
| Texture2D::Texture2D | ( | const char * | path, | |
| GLenum | wrapS = GL_REPEAT, |
|||
| GLenum | wrapT = GL_REPEAT, |
|||
| GLenum | magFilter = GL_LINEAR, |
|||
| GLenum | minFilter = GL_LINEAR_MIPMAP_LINEAR | |||
| ) |
Loads a texture from a file. The loader will check the file-extension, to find out the format of the image. At the moment, only OpenEXR ist supported.
| Texture2D::Texture2D | ( | V2i | size, | |
| Color4f | color = Color4f(0.0), |
|||
| GLenum | wrapS = GL_REPEAT, |
|||
| GLenum | wrapT = GL_REPEAT, |
|||
| GLenum | magFilter = GL_LINEAR, |
|||
| GLenum | minFilter = GL_LINEAR_MIPMAP_LINEAR | |||
| ) |
Creates a blank texture. This can be useful for procedural textures e.g. for effects or for the preparation of a renderbuffer.
| Texture2D::Texture2D | ( | V2i | size, | |
| Color4f * | pixels, | |||
| GLenum | wrapS = GL_REPEAT, |
|||
| GLenum | wrapT = GL_REPEAT, |
|||
| GLenum | magFilter = GL_LINEAR, |
|||
| GLenum | minFilter = GL_LINEAR_MIPMAP_LINEAR | |||
| ) |
Creates a texture, by making a copy of the supplied surface.
| void Texture2D::build_mipmaps | ( | ) |
Rebuild the mipmap-Levels of the texture.
| GLuint Texture2D::get_texture_name | ( | ) | [inline] |
Returns the openGL texture name of this texture.
| void Texture2D::send_to_GPU | ( | ) |
Load the pixel data as texture. You only have to use this, when the pixel-data has changed. This will be done automatically, a Texture-contruction.
1.5.7.1