|
| Image () |
|
| Image (const char *const rawData, const uint width, const uint height, const GLenum format=GL_BGRA, const GLenum type=GL_UNSIGNED_BYTE) |
|
| Image (const char *const rawData, const Size< uint > &size, const GLenum format=GL_BGRA, const GLenum type=GL_UNSIGNED_BYTE) |
|
| Image (const Image &image) |
|
| ~Image () |
|
void | loadFromMemory (const char *const rawData, const uint width, const uint height, const GLenum format=GL_BGRA, const GLenum type=GL_UNSIGNED_BYTE) noexcept |
|
void | loadFromMemory (const char *const rawData, const Size< uint > &size, const GLenum format=GL_BGRA, const GLenum type=GL_UNSIGNED_BYTE) noexcept |
|
bool | isValid () const noexcept |
|
uint | getWidth () const noexcept |
|
uint | getHeight () const noexcept |
|
const Size< uint > & | getSize () const noexcept |
|
const char * | getRawData () const noexcept |
|
GLenum | getFormat () const noexcept |
|
GLenum | getType () const noexcept |
|
void | draw () |
|
void | drawAt (const int x, const int y) |
|
void | drawAt (const Point< int > &pos) |
|
Image & | operator= (const Image &image) noexcept |
|
bool | operator== (const Image &image) const noexcept |
|
bool | operator!= (const Image &image) const noexcept |
|
Base DGL Image class.
This is an Image class that handles raw image data in pixels. You can init the image data on the contructor or later on by calling loadFromMemory().
To generate raw data useful for this class see the utils/png2rgba.py script. Be careful when using a PNG without alpha channel, for those the format is 'GL_BGR' instead of the default 'GL_BGRA'.
Images are drawn on screen via 2D textures.