Inheritance diagram for Eaagles::BasicGL::LcTexture:


General (simple) 2D texture class
NOTE: Currently reads only simple, uncompressed Microsoft Bitmap (BMP) files.
NOTE: The width & height of the bitmap is truncated to powers of 2.
Slots:
1. width (LcNumber) Size of the texture map.
2. height (LcNumber) Size of the texture map.
3. redScale (LcNumber) for glPixelTransferf(GL_RED_SCALE)
4. redBias (LcNumber) for glPixelTransferf(GL_RED_BIAS)
5. greenScale (LcNumber) for glPixelTransferf(GL_GREEN_SCALE)
6. greenBias (LcNumber) for glPixelTransferf(GL_GREEN_BIAS)
7. blueScale (LcNumber) for glPixelTransferf(GL_BLUE_SCALE)
8. blueBias (LcNumber) for glPixelTransferf(GL_BLUE_BIAS)
9. wrapS (LcIdent) for glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S)
10. wrapT (LcIdent) for glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T)
11. magFilter (LcIdent) for glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER)
12. minFilter (LcIdent) for glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER)
13. path (LcString) Path to the texture directory.
14. file (LcString) Texture file name.
| Eaagles::BasicGL::LcTexture::LcTexture | ( | ) |
| bool Eaagles::BasicGL::LcTexture::isLoaded | ( | ) | const [inline] |
Returns true if the texture is loaded.
| bool Eaagles::BasicGL::LcTexture::isNotLoaded | ( | ) | const [inline] |
Returns true if the texture is not loaded.
| GLuint Eaagles::BasicGL::LcTexture::getTexture | ( | ) | const [inline] |
Returns the texture.
| int Eaagles::BasicGL::LcTexture::getNumComponents | ( | ) | const [inline] |
Returns the number of components.
| int Eaagles::BasicGL::LcTexture::getWidth | ( | ) | const [inline] |
Returns the width.
| int Eaagles::BasicGL::LcTexture::getHeight | ( | ) | const [inline] |
Returns the height.
| GLenum Eaagles::BasicGL::LcTexture::getFormat | ( | ) | const [inline] |
Returns the format.
| int Eaagles::BasicGL::LcTexture::getWrapS | ( | ) | const [inline] |
glTexParameteri() Attribute. Returns the wrapS value
| int Eaagles::BasicGL::LcTexture::getWrapT | ( | ) | const [inline] |
glTexParameteri() Attribute. Returns the wrapT value.
| int Eaagles::BasicGL::LcTexture::getMagFilter | ( | ) | const [inline] |
glTexParameteri() Attribute. Returns the magFilter value
| int Eaagles::BasicGL::LcTexture::getMinFilter | ( | ) | const [inline] |
glTexParameteri() Attribute. Returns the minFilter value
| bool Eaagles::BasicGL::LcTexture::setWrapS | ( | const int | v | ) |
glTexParameteri() Attribute. Sets the wrapS value
| bool Eaagles::BasicGL::LcTexture::setWrapT | ( | const int | v | ) |
glTexParameteri() Attribute. Sets the wrapT value
| bool Eaagles::BasicGL::LcTexture::setMagFilter | ( | const int | v | ) |
glTexParameteri() Attribute. Sets the magFilter value
| bool Eaagles::BasicGL::LcTexture::setMinFilter | ( | const int | v | ) |
glTexParameteri() Attribute. Sets the minFilter value
| LCreal Eaagles::BasicGL::LcTexture::getRedScale | ( | ) | const [inline] |
glPixelTransferf() Attribute. Returns the redScale value
| LCreal Eaagles::BasicGL::LcTexture::getRedBias | ( | ) | const [inline] |
glPixelTransferf() Attribute. Returns the redBias value
| LCreal Eaagles::BasicGL::LcTexture::getGreenScale | ( | ) | const [inline] |
glPixelTransferf() Attribute. Returns the greenScale value
| LCreal Eaagles::BasicGL::LcTexture::getGreenBias | ( | ) | const [inline] |
glPixelTransferf() Attribute. Returns the greenBias value
| LCreal Eaagles::BasicGL::LcTexture::getBlueScale | ( | ) | const [inline] |
glPixelTransferf() Attribute. Returns the blueScale value
| LCreal Eaagles::BasicGL::LcTexture::getBlueBias | ( | ) | const [inline] |
glPixelTransferf() Attribute. Returns the blueBias value
| bool Eaagles::BasicGL::LcTexture::setRedScale | ( | const LCreal | s | ) |
Sets the redScale value.
| bool Eaagles::BasicGL::LcTexture::setRedBias | ( | const LCreal | b | ) |
Sets the redBias value.
| bool Eaagles::BasicGL::LcTexture::setGreenScale | ( | const LCreal | s | ) |
Sets the greenScale value.
| bool Eaagles::BasicGL::LcTexture::setGreenBias | ( | const LCreal | b | ) |
Sets the greenBias value.
| bool Eaagles::BasicGL::LcTexture::setBlueScale | ( | const LCreal | s | ) |
Sets the blueScale value.
| bool Eaagles::BasicGL::LcTexture::setBlueBias | ( | const LCreal | b | ) |
Sets the blueBias value.
| const char * Eaagles::BasicGL::LcTexture::getTexturePath | ( | ) | const |
Returns the path to the current textures directory.
| const char * Eaagles::BasicGL::LcTexture::getTextureFileName | ( | ) | const |
Returns the filename of the current texture.
| void Eaagles::BasicGL::LcTexture::loadTexture | ( | ) |
Loads the texture.
| bool Eaagles::BasicGL::LcTexture::setWidth | ( | const int | size | ) | [protected] |
Sets the width.
| bool Eaagles::BasicGL::LcTexture::setHeight | ( | const int | size | ) | [protected] |
Sets the height.
| bool Eaagles::BasicGL::LcTexture::setFormat | ( | const GLenum | f | ) | [protected] |
Sets the format.
| bool Eaagles::BasicGL::LcTexture::setNumComponents | ( | const int | nc | ) | [protected] |
Sets the number of components.
| bool Eaagles::BasicGL::LcTexture::setSlotWidth | ( | const Basic::LcNumber *const | size | ) | [protected] |
Slot table function - sets the width.
| bool Eaagles::BasicGL::LcTexture::setSlotHeight | ( | const Basic::LcNumber *const | size | ) | [protected] |
Slot table function - sets the height.
| bool Eaagles::BasicGL::LcTexture::setSlotRedScale | ( | const Basic::LcNumber *const | s | ) | [protected] |
Slot table function - sets the redScale value to s and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotRedBias | ( | const Basic::LcNumber *const | b | ) | [protected] |
Slot table function - sets the redBias value to b and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotGreenScale | ( | const Basic::LcNumber *const | s | ) | [protected] |
Slot table function - sets the greenScale value to s and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotGreenBias | ( | const Basic::LcNumber *const | b | ) | [protected] |
Slot table function - sets the greenBias value to b and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotBlueScale | ( | const Basic::LcNumber *const | s | ) | [protected] |
Slot table function - sets the blueScale value to s and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotBlueBias | ( | const Basic::LcNumber *const | b | ) | [protected] |
Slot table function - sets the blueBias value to b and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotWrapS | ( | const Basic::LcIdent *const | v | ) | [protected] |
Slot table function - sets the wrapS value to v and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotWrapT | ( | const Basic::LcIdent *const | v | ) | [protected] |
Slot table function - sets the wrapT value to v and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotMagFilter | ( | const Basic::LcIdent *const | v | ) | [protected] |
Slot table function - sets the magFilter value to v and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotMinFilter | ( | const Basic::LcIdent *const | v | ) | [protected] |
Slot table function - sets the minFilter value to v and returns true if successful.
| bool Eaagles::BasicGL::LcTexture::setSlotTexturePath | ( | Basic::LcString *const | s | ) | [protected] |
Slot table function - sets the path to the current textures directory.
| bool Eaagles::BasicGL::LcTexture::setSlotTextureFileName | ( | Basic::LcString *const | s | ) | [protected] |
Slot table function - sets the filename of the current texture.
| GLubyte * Eaagles::BasicGL::LcTexture::readBitmapFile | ( | const char *const | filename | ) | [protected] |
Read in the bitmap file.
| GLubyte * Eaagles::BasicGL::LcTexture::readRgbValues | ( | FILE *const | fp, | |
| BITMAPFILEHEADER *const | bmh, | |||
| BITMAPINFOHEADER *const | bmfi | |||
| ) | [protected] |
Read the color components from the file & return the bit map.
| GLubyte * Eaagles::BasicGL::LcTexture::readColorValues | ( | FILE *const | fp, | |
| BITMAPFILEHEADER *const | bmh, | |||
| BITMAPINFOHEADER *const | bmfi | |||
| ) | [protected] |
Read the color table and color index values; returns the bit map.
Path to texture directory.
Texture filename.
GLuint Eaagles::BasicGL::LcTexture::texture [private] |
Texture.
GLubyte* Eaagles::BasicGL::LcTexture::pBits [private] |
Pointer to scaled 32bpp Texture bits.
int Eaagles::BasicGL::LcTexture::width [private] |
Texture width (must be power of two).
int Eaagles::BasicGL::LcTexture::height [private] |
Texture height (must be power of two).
bool Eaagles::BasicGL::LcTexture::loaded [private] |
Texture has been loaded.
GLenum Eaagles::BasicGL::LcTexture::format [private] |
Texture format: GL_RGB, GL_BGRA_EXT, etc.
int Eaagles::BasicGL::LcTexture::nComponents [private] |
Number of color components { 3 or 4 }.
int Eaagles::BasicGL::LcTexture::wrapS [private] |
glTexParameteri() Attribute. GL_REPEAT (default) or GL_CLAMP
int Eaagles::BasicGL::LcTexture::wrapT [private] |
glTexParameteri() Attribute. GL_REPEAT (default) or GL_CLAMP
int Eaagles::BasicGL::LcTexture::magFilter [private] |
glTexParameteri() Attribute. GL_NEAREST (default) or GL_LINEAR
int Eaagles::BasicGL::LcTexture::minFilter [private] |
glTexParameteri() Attribute. GL_NEAREST (default) or GL_LINEAR
LCreal Eaagles::BasicGL::LcTexture::redScale [private] |
glPixelTransferf() Attributes
LCreal Eaagles::BasicGL::LcTexture::redBias [private] |
LCreal Eaagles::BasicGL::LcTexture::greenBias [private] |
LCreal Eaagles::BasicGL::LcTexture::blueScale [private] |
LCreal Eaagles::BasicGL::LcTexture::blueBias [private] |
1.5.0