#include <xrb_texture.hpp>
Public Types | |
enum | Format { GRAYSCALE1 = 0, GRAYSCALE4, GRAYSCALE8, GRAYSCALE16, GRAYSCALE_ALPHA1, GRAYSCALE_ALPHA4, GRAYSCALE_ALPHA8, GRAYSCALE_ALPHA16, RGB332, RGB4, RGB565, RGB8, RGB16, RGB5_A1, RGBA4, RGBA8, RGBA16, FORMAT_COUNT } |
Public Member Functions | |
ScreenCoordVector2 | Size () const |
ScreenCoord | Width () const |
ScreenCoord | Height () const |
Uint8 | BitDepth () const |
Uint32 | DataLength () const |
Uint8 * | Data () const |
Static Public Member Functions | |
static Texture * | Create (std::string const &path) |
static Texture * | Create (ScreenCoordVector2 const &size, bool zero_out_the_data) |
static Texture * | Create (ScreenCoordVector2 const &size, Uint8 *data) |
Texture objects should be instantiated by using one of the two Create methods provided.
File I/O is done using the PNG file format.
The raw texture data can be accessed directly through Data.
(not yet implemented:) The texture data can be stored/read/written in several bit-depth formats, given by Xrb::Texture::Format.
Definition at line 43 of file xrb_texture.hpp.