#include <image.h>
Public Member Functions | |
Image () | |
Constructor. | |
~Image () | |
Destructor. | |
IMG_LOAD_ERROR | LoadImage (const char *path) |
u32 | GetWidth () const |
u32 | GetHeight () const |
bool | IsInitialized () const |
void | BindTexture (bool bilinear=true) |
IMG_LOAD_ERROR wsp::Image::LoadImage | ( | const char * | path | ) |
Loads an image from a file. Width and height have to be a multiple of 4, or it won't load. Uses fopen(), so some basic filesystem initialization is required.
path | The path to the file. |
u32 wsp::Image::GetWidth | ( | ) | const |
Gets the width of this image.
u32 wsp::Image::GetHeight | ( | ) | const |
Gets the height of this image.
bool wsp::Image::IsInitialized | ( | ) | const |
Checks if the image is loaded.
void wsp::Image::BindTexture | ( | bool | bilinear = true |
) |
Used to select this image for the next texturing process. Most of the time you won't gonna use this.
bilinear | Turns on bilinear filtering. |