a class defining a 2D texture according to OpenGL
![]() | drawGenericTexture (GenericTexture type) draw a texture of a given type |
![]() | updateTexture () const update the OpenGL texture based on the new texture buffer |
![]() | getNbColumns () const return the nb of texture columns |
![]() | getNbRealColumns () const return the nb of meaningful texture columns |
![]() | getColor (const unsigned int col, unsigned char *color) const get the RGBA color of a texture pixel |
![]() | getId () const return the texture ID |
![]() | enableTextureCoordinatesGeneration () const enable texture coordinates generation |
![]() | disableTextureCoordinatesGeneration () const disable texture coordinates generation |
![]() | enableTexture (TextureMode m) use this texture |
![]() | disableTexture (TextureMode m) const stop using this texture |
![]() | interpolateTexture (TextureInterpolation i) const set the type of texture interpolation |
![]() | extrapolateTexture (TextureExtrapolation i) const set the type of texture extrapolation |
![]() | applyTextureMode (TextureMode i, const double s[4], const double t[4]) const set the type of texture interpolation |
![]() | constructors
| ||||||
![]() | destructor
|
![]() | binded if the texture has been binded |
![]() | id the texture ID |
![]() | buffer texture buffer |
![]() | ncols number of columns: must be a power of two |
![]() | nbRealColumns the number of columns that are really meaningful |
![]() | format pixel format |
![]() | updateDisplayList if the display list should be update |
a class defining a 2D texture according to OpenGL
enum Format
enum TextureInterpolation
enum TextureExtrapolation
enum TextureMode
bool binded
GLuint id
void* buffer
unsigned int ncols
unsigned int nbRealColumns
Format format
bool updateDisplayList
constructors
Texture1D(unsigned int *b, const unsigned int nc, Format f=TEXTURE_RGBA)
nr - the number of rows (may not be a power of 2)
nc - the number of columns (may not be a power of 2)
f - the format of each pixel Texture1D(GenericTexture type, const unsigned int size)
size - the number of rows and columns of the texture
exponent - for the gaussian and halo texture controls the spread of the gaussian
radius - for the halo texture controls the radius of the halo (as default it is a quarter of the size ) Texture1D(char *filename)
destructor
void enlargeTexture(const void *b, const unsigned int nc)
void createTexture()
void init()
void drawGenericTexture(GenericTexture type)
exponent - for the gaussian and halo texture controls the spread of the gaussian
radius - for the halo texture controls the radius of the halo (as default it is a quarter of the size ) void updateTexture() const
unsigned int getNbColumns() const
unsigned int getNbRealColumns() const
void getColor(const unsigned int col, unsigned char *color) const
col - the column index of a pixel
color - the array of Red Green Blue and Alpha value GLuint getId() const
void enableTextureCoordinatesGeneration() const
void disableTextureCoordinatesGeneration() const
void enableTexture(TextureMode m)
void disableTexture(TextureMode m) const
void interpolateTexture(TextureInterpolation i) const
void extrapolateTexture(TextureExtrapolation i) const
void applyTextureMode(TextureMode i, const double s[4], const double t[4]) const
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de