#include <Texture2D.h>
Public Member Functions | |
| Texture2D (void) | |
| virtual | ~Texture2D (void) |
| bool | isInitialized () const |
| unsigned int | getWidth () const |
| unsigned int | getHeight () const |
| unsigned int | getDepth () const |
| int | getInternalFormat () const |
| void | use () const |
| void | useFramebuffer () const |
| bool | createTextureFromFile (string filename, GLint internalFormat) |
| bool | createTextureFromBuffer (unsigned int width, unsigned int height, GLint internalFormat, GLenum dataFormat, GLenum dataType, const void *buffer) |
| bool | createTextureFromFramebuffer (unsigned int width, unsigned int height, GLint internalFormat, GLenum dataFormat, GLenum dataType) |
Private Member Functions | |
| void | cleanUp () |
| unsigned int | getNextPowerOfTwo (unsigned int number) const |
Private Attributes | |
| GLuint | m_texID |
| GLuint | m_framebufferID |
| GLint | m_internalFormat |
| unsigned int | m_width |
| unsigned int | m_height |
| bool | m_initialized |
| Texture2D::Texture2D | ( | void | ) |
| Texture2D::~Texture2D | ( | void | ) | [virtual] |
| void Texture2D::cleanUp | ( | ) | [private] |
cleans up all GL initializations and possible memory allocations
| bool Texture2D::createTextureFromBuffer | ( | unsigned int | width, | |
| unsigned int | height, | |||
| GLint | internalFormat, | |||
| GLenum | dataFormat, | |||
| GLenum | dataType, | |||
| const void * | buffer | |||
| ) |
| bool Texture2D::createTextureFromFile | ( | string | filename, | |
| GLint | internalFormat | |||
| ) |
| bool Texture2D::createTextureFromFramebuffer | ( | unsigned int | width, | |
| unsigned int | height, | |||
| GLint | internalFormat, | |||
| GLenum | dataFormat, | |||
| GLenum | dataType | |||
| ) |
| unsigned int Texture2D::getDepth | ( | ) | const |
| unsigned int Texture2D::getHeight | ( | ) | const |
| int Texture2D::getInternalFormat | ( | ) | const |
| unsigned int Texture2D::getNextPowerOfTwo | ( | unsigned int | number | ) | const [private] |
| number | A number greater or equal to 0 |
| unsigned int Texture2D::getWidth | ( | ) | const |
| bool Texture2D::isInitialized | ( | ) | const |
| void Texture2D::use | ( | ) | const |
Binds the texture to prepare for following usage
| void Texture2D::useFramebuffer | ( | ) | const |
GLuint Texture2D::m_framebufferID [private] |
unsigned int Texture2D::m_height [private] |
bool Texture2D::m_initialized [private] |
GLint Texture2D::m_internalFormat [private] |
GLuint Texture2D::m_texID [private] |
unsigned int Texture2D::m_width [private] |
1.5.7.1