|
SimpleGL
1.1.0
A framework for platform independent rendering
|
This class wraps an OpenGL texture object. More...
#include <texture_object.hpp>
Public Member Functions | |
| Texture (void) | |
| Generates a new texture object. More... | |
| ~Texture (void) | |
| Deletes the texture object. More... | |
| GLuint | getHandle () |
| Returns the handle of the texture object. More... | |
| int | getWidth () |
| Returns the width of the texture object. More... | |
| int | getHeight () |
| Returns the height of the texture object. More... | |
| void | bind () |
| Binds the texture object. More... | |
| void | generateMipMap () |
| Generates mipmaps for the texture object. More... | |
| void | setMinFilter (TextureFilter filter) |
| Sets the minification filter of the texture object. More... | |
| void | setMagFilter (TextureFilter filter) |
| Sets the magnification filter of the texture object. More... | |
| void | setWrapS (TextureWrap wrap) |
| Sets the wrapping function of the texture object's coordinate S. More... | |
| void | setWrapT (TextureWrap wrap) |
| Sets the wrapping function of the texture object's coordinate T. More... | |
| void | uploadImage (int width, int height, unsigned char *data) |
| Uploads image data to the texture object. More... | |
| void | uploadImage (TextureData image) |
| Uploads image data to the texture object. More... | |
This class wraps an OpenGL texture object.
Definition at line 76 of file texture_object.hpp.
| sgl::Texture::Texture | ( | void | ) |
Generates a new texture object.
Definition at line 15 of file texture_object.cpp.
| sgl::Texture::~Texture | ( | void | ) |
Deletes the texture object.
Definition at line 19 of file texture_object.cpp.
| void sgl::Texture::bind | ( | ) |
Binds the texture object.
Definition at line 40 of file texture_object.cpp.
| void sgl::Texture::generateMipMap | ( | ) |
Generates mipmaps for the texture object.
Definition at line 51 of file texture_object.cpp.
| GLuint sgl::Texture::getHandle | ( | ) |
Returns the handle of the texture object.
Definition at line 28 of file texture_object.cpp.
| int sgl::Texture::getHeight | ( | ) |
Returns the height of the texture object.
Definition at line 36 of file texture_object.cpp.
| int sgl::Texture::getWidth | ( | ) |
Returns the width of the texture object.
Definition at line 32 of file texture_object.cpp.
| void sgl::Texture::setMagFilter | ( | TextureFilter | filter | ) |
Sets the magnification filter of the texture object.
| filter | The filter to set. |
Definition at line 59 of file texture_object.cpp.
| void sgl::Texture::setMinFilter | ( | TextureFilter | filter | ) |
Sets the minification filter of the texture object.
| filter | The filter to set. |
Definition at line 55 of file texture_object.cpp.
| void sgl::Texture::setWrapS | ( | TextureWrap | wrap | ) |
Sets the wrapping function of the texture object's coordinate S.
| wrap | The wrapping function to set. |
Definition at line 63 of file texture_object.cpp.
| void sgl::Texture::setWrapT | ( | TextureWrap | wrap | ) |
Sets the wrapping function of the texture object's coordinate T.
| wrap | The wrapping function to set. |
Definition at line 67 of file texture_object.cpp.
| void sgl::Texture::uploadImage | ( | int | width, |
| int | height, | ||
| unsigned char * | data | ||
| ) |
Uploads image data to the texture object.
| width | The width of the image. |
| height | The height of the image. |
| data | The image data. |
Definition at line 71 of file texture_object.cpp.
| void sgl::Texture::uploadImage | ( | TextureData | image | ) |
Uploads image data to the texture object.
| image | The image data. |
Definition at line 77 of file texture_object.cpp.
1.8.11