Inherited by SwigDirector_Surface.
Public Member Functions | |
void | draw (int x1, int y1, int x2, int y2) const |
void | draw (int dx, int dy, int sx1, int sy1, int sx2, int sy2) const |
void | draw (int x, int y) const |
float | getBottomTexCoord () const |
virtual CacheableType | getCacheableType () const |
int | getGlHeight () const |
int | getGlWidth () const |
int | getHeight () const |
float | getLeftTexCoord () const |
float | getRightTexCoord () const |
GLuint | getTexture () const |
float | getTopTexCoord () const |
int | getWidth () const |
void | setLinearScaling () const |
void | setNearestScaling () const |
Surface (const char *filename) | |
Surface (int width, int height, int pixelSize=3) | |
virtual | ~Surface () |
Private Member Functions | |
void | compileList () |
void | generateTextureFromPixels () |
Private Attributes | |
float | bottomTexCoord |
int | glHeight |
int | glWidth |
int | height |
float | leftTexCoord |
GLuint | list |
GLubyte * | pixels |
int | pixelSize |
float | rightTexCoord |
GLuint | texture |
float | topTexCoord |
int | width |
Annchienta::Surface::Surface | ( | int | width, | |
int | height, | |||
int | pixelSize = 3 | |||
) |
Annchienta::Surface::Surface | ( | const char * | filename | ) |
Load an image into a surface.
filename | Valid PNG file. |
virtual Annchienta::Surface::~Surface | ( | ) | [virtual] |
void Annchienta::Surface::compileList | ( | ) | [private] |
void Annchienta::Surface::draw | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) | const |
Draws the surface, stretched to rectangle on the screen.
Not available in Python.
void Annchienta::Surface::draw | ( | int | dx, | |
int | dy, | |||
int | sx1, | |||
int | sy1, | |||
int | sx2, | |||
int | sy2 | |||
) | const |
Draws a part of the surface to the given position.
Not available in Python.
void Annchienta::Surface::draw | ( | int | x, | |
int | y | |||
) | const |
Draws the surface at the given position. This method is slightly faster than the other draw() methods because it makes use of display lists.
Not available in Python.
void Annchienta::Surface::generateTextureFromPixels | ( | ) | [private] |
float Annchienta::Surface::getBottomTexCoord | ( | ) | const |
virtual CacheableType Annchienta::Surface::getCacheableType | ( | ) | const [virtual] |
Reimplemented from Annchienta::Cacheable.
Reimplemented in SwigDirector_Surface.
int Annchienta::Surface::getGlHeight | ( | ) | const |
int Annchienta::Surface::getGlWidth | ( | ) | const |
int Annchienta::Surface::getHeight | ( | ) | const |
float Annchienta::Surface::getLeftTexCoord | ( | ) | const |
float Annchienta::Surface::getRightTexCoord | ( | ) | const |
GLuint Annchienta::Surface::getTexture | ( | ) | const |
float Annchienta::Surface::getTopTexCoord | ( | ) | const |
int Annchienta::Surface::getWidth | ( | ) | const |
void Annchienta::Surface::setLinearScaling | ( | ) | const |
Set OpenGL scaling mode to Linear for this surface.
void Annchienta::Surface::setNearestScaling | ( | ) | const |
Set OpenGL scaling mode to Nearest. This is the default behaviour.
float Annchienta::Surface::bottomTexCoord [private] |
int Annchienta::Surface::glHeight [private] |
int Annchienta::Surface::glWidth [private] |
int Annchienta::Surface::height [private] |
float Annchienta::Surface::leftTexCoord [private] |
GLuint Annchienta::Surface::list [private] |
GLubyte* Annchienta::Surface::pixels [private] |
int Annchienta::Surface::pixelSize [private] |
float Annchienta::Surface::rightTexCoord [private] |
GLuint Annchienta::Surface::texture [private] |
float Annchienta::Surface::topTexCoord [private] |
int Annchienta::Surface::width [private] |