#include <TextureInterface.h>
Inherited by TextureAlpha, and TextureMasked.
Inheritance diagram for TextureInterface:
Public Member Functions | |
TextureInterface () | |
Stadard costructor. | |
virtual | ~TextureInterface () |
Standard destructor. | |
virtual int | render (double x_begin, double x_end, double y_begin, double y_end)=0 |
Renders the plane with the textures on it. | |
virtual int | loadAndBind (std::string p_filename, eTextureModification p_modifikationflag=TM_Masked_Normal)=0 |
Loads and binds the texture and generates a mask and also binds it. | |
virtual int | bind (TextureData *data) |
Binds the texture in OpenGL. | |
Public Attributes | |
double | ratio |
Holds the ratio of the image. | |
Protected Member Functions | |
virtual TextureData * | loadBMP (std::string p_filename) |
Loads the texture specified by the filename (BMP-file). | |
virtual TextureData * | loadPNG (std::string p_filename) |
Loads the texture specified by the filename (PNG-file). | |
Static Private Attributes | |
static int | s_handlerIndex = 1 |
Increasing handler index. |
Definition at line 38 of file TextureInterface.h.
TextureInterface::TextureInterface | ( | ) |
TextureInterface::~TextureInterface | ( | ) | [virtual] |
virtual int TextureInterface::render | ( | double | x_begin, | |
double | x_end, | |||
double | y_begin, | |||
double | y_end | |||
) | [pure virtual] |
Renders the plane with the textures on it.
Implemented in TextureAlpha, and TextureMasked.
Referenced by Texture::render().
virtual int TextureInterface::loadAndBind | ( | std::string | p_filename, | |
eTextureModification | p_modifikationflag = TM_Masked_Normal | |||
) | [pure virtual] |
Loads and binds the texture and generates a mask and also binds it.
p_filename | Filename for the texture to load. | |
p_modifikationflag | Flag for postprocess modifying. |
Implemented in TextureAlpha, and TextureMasked.
int TextureInterface::bind | ( | TextureData * | data | ) | [virtual] |
Binds the texture in OpenGL.
data | The texture data. |
Definition at line 81 of file TextureInterface.cpp.
References _BITMAPINFOHEADER::biHeight, _BITMAPINFOHEADER::biWidth, TextureData::infoheader, TextureData::l_texture, and s_handlerIndex.
Referenced by TextureMasked::loadAndBind(), and TextureAlpha::loadAndBind().
TextureData * TextureInterface::loadBMP | ( | std::string | p_filename | ) | [protected, virtual] |
Loads the texture specified by the filename (BMP-file).
p_filename | Filename for the texture to load. BMP-File |
Definition at line 39 of file TextureInterface.cpp.
References _BITMAPINFOHEADER::biHeight, _BITMAPINFOHEADER::biWidth, TextureData::fileheader, TextureData::infoheader, TextureData::l_texture, TextureData::rgb, _RGBTRIPLE::rgbtBlue, _RGBTRIPLE::rgbtGreen, and _RGBTRIPLE::rgbtRed.
Referenced by TextureMasked::loadAndBind().
TextureData * TextureInterface::loadPNG | ( | std::string | p_filename | ) | [protected, virtual] |
Loads the texture specified by the filename (PNG-file).
p_filename | Filename for the texture to load. PNG-File |
Definition at line 107 of file TextureInterface.cpp.
References _BITMAPINFOHEADER::biHeight, _BITMAPINFOHEADER::biWidth, TextureData::infoheader, and TextureData::l_texture.
Referenced by TextureAlpha::loadAndBind().
double TextureInterface::ratio |
Holds the ratio of the image.
Definition at line 78 of file TextureInterface.h.
Referenced by TextureMasked::loadAndBind(), TextureAlpha::loadAndBind(), and Texture::loadAndBind().
int TextureInterface::s_handlerIndex = 1 [static, private] |