Vis::Texture2D Class Reference
#include <VisTexture2D.h>
List of all members.
|
Public Member Functions |
| Texture2D () |
| ~Texture2D () |
void | setData (int width, int height, GLint internalFormat, GLenum format, GLenum type, bool mipmap, void *data=NULL) |
void | setData (void *data, GLenum format, GLenum type) |
bool | setDataFromFile (const string &filename, bool mipmap) |
void | setParameter (GLenum wrapS, GLenum wrapT, GLenum mag, GLenum min) |
GLuint | getTextureId () const |
void | bind () |
void | unbind () |
int | getWidth () const |
int | getHeight () const |
vector< unsigned char > | getData () |
Detailed Description
2D Texture.
Constructor & Destructor Documentation
Vis::Texture2D::Texture2D |
( |
|
) |
|
Vis::Texture2D::~Texture2D |
( |
|
) |
|
Member Function Documentation
void Vis::Texture2D::bind |
( |
|
) |
|
vector< unsigned char > Vis::Texture2D::getData |
( |
|
) |
|
Return texture data.
- Returns:
- texture data.
int Vis::Texture2D::getHeight |
( |
|
) |
const |
Return the height of the texture.
- Returns:
- height of the texture.
GLuint Vis::Texture2D::getTextureId |
( |
|
) |
const |
Return the texture handle.
- Returns:
- handle to the texture.
int Vis::Texture2D::getWidth |
( |
|
) |
const |
Return the width of the texture.
- Returns:
- width of the texture.
void Vis::Texture2D::setData |
( |
void * |
data, |
|
|
GLenum |
format, |
|
|
GLenum |
type | |
|
) |
| | |
Set the texture data.
- Parameters:
-
| data | texture data. |
| format | format of the texture. |
| type | data type |
void Vis::Texture2D::setData |
( |
int |
width, |
|
|
int |
height, |
|
|
GLint |
internalFormat, |
|
|
GLenum |
format, |
|
|
GLenum |
type, |
|
|
bool |
mipmap, |
|
|
void * |
data = NULL | |
|
) |
| | |
Set the texture data, with empty data.
- Parameters:
-
| width | width of the texture. |
| height | height of the texture. |
| internalFormat | internal format of the texture. |
| format | format of the texture. |
| type | data type |
| mipmap | true to generate mipmaps, false no mipmap generation. |
bool Vis::Texture2D::setDataFromFile |
( |
const string & |
filename, |
|
|
bool |
mipmap | |
|
) |
| | |
Set texture data from a file.
- Parameters:
-
| filename | image filename. |
| mipmap | true to generate mipmaps, false no mipmap generation. |
void Vis::Texture2D::setParameter |
( |
GLenum |
wrapS, |
|
|
GLenum |
wrapT, |
|
|
GLenum |
mag, |
|
|
GLenum |
min | |
|
) |
| | |
Set texture paramters, for clamping an min and magnification.
- Parameters:
-
| wrapS | clamping |
| wrapT | clamping |
| mag | magnification paramter. |
| min | minification parameter. |
void Vis::Texture2D::unbind |
( |
|
) |
|
The documentation for this class was generated from the following files:
- E:/Studium/vislu/abgabe2/visproj/src/texture/VisTexture2D.h
- E:/Studium/vislu/abgabe2/visproj/src/texture/impl/VisTexture2D.cpp