#include <texture.h>
Public Member Functions | |
Texture (const string &rcFile) | |
Static Public Member Functions | |
static const GLuint | Load (const string &rcFile) |
static const GLuint | Load (const string &rcFile, uint &ruiW, uint &ruiH) |
static SDL_Surface * | HorizontalMirror (const SDL_Surface *const psurface) |
static void | Surface2Texture (const SDL_Surface *const psurface, GLuint &ruiTexture) |
Static Private Member Functions | |
static void | GetCorrectSize (const uint w, const uint h, uint &rW, uint &rH) |
Private Attributes | |
uint | uiWidth |
uint | uiHeight |
GLuint | uiTexture |
Definition at line 30 of file texture.h.
|
Find the correct OpenGL dimensions for given width w and height h
Definition at line 263 of file texture.cpp. Referenced by Surface2Texture(). |
|
After calling this function, the image pixels are flipped in the vertical direction because the SDL_image library reads the image's pixels from the upper left corner, left to right, to the bottom right corner whereas the glTexImage2D builds the texture from the bottom left corner, left to right, to the upper right corner
Definition at line 113 of file texture.cpp. Referenced by Load(). |
|
Look at the description above
Definition at line 67 of file texture.cpp. References HorizontalMirror(), and Surface2Texture(). |
|
Open the specified image, read it into a SDL_surface then convert it to an OpenGL texture. Use it carefully because it doesn't handle error checking right now.
Definition at line 57 of file texture.cpp. Referenced by Renderer::DisplaySplash(), and ModelLoader::LoadOCM(). |
|
Convert a SDL surface to OpenGL texture
Definition at line 167 of file texture.cpp. References GetCorrectSize(). Referenced by Load(). |