#include <openglimageloader.hpp>
Inheritance diagram for gcn::OpenGLImageLoader:
This ImageLoader cannot load images by itself. It requires another imageloader, such as for example the SDLImageLoader, to be able to load images.
Definition at line 72 of file openglimageloader.hpp.
Public Member Functions | |
OpenGLImageLoader () | |
Constructor. | |
OpenGLImageLoader (ImageLoader *imageLoader) | |
Constructor. | |
virtual void | setHostImageLoader (ImageLoader *imageLoader) |
Set the host ImageLoader. | |
virtual void | prepare (const std::string &filename) |
Prepares an image for reading. | |
virtual void | free (Image *image) |
This function frees an image. | |
virtual void * | getRawData () |
Rreturns a pointer of raw data of an image. | |
virtual void * | finalize () |
Finalizes an image meaning it will return the image data. | |
virtual void | discard () |
Discards a prepared image. | |
virtual int | getHeight () const |
Gets the height if the image. | |
virtual int | getWidth () const |
Gets the width of an image. | |
virtual Color | getPixel (int x, int y) |
Gets the color of a pixel at coordinate x and y. | |
virtual void | putPixel (int x, int y, const Color &color) |
Puts a pixel with a certain color at coordinate x and y. | |
Protected Attributes | |
ImageLoader * | mImageLoader |
|
Constructor.
Definition at line 81 of file openglimageloader.cpp. |
|
Discards a prepared image.
Implements gcn::ImageLoader. Definition at line 215 of file openglimageloader.cpp. References gcn::ImageLoader::discard(). |
|
Finalizes an image meaning it will return the image data. If the image contains pixels with "magic pink" (0xff00ff) they will be treated as transparent pixels.
Implements gcn::ImageLoader. Definition at line 111 of file openglimageloader.cpp. References gcn::ImageLoader::discard(), gcn::ImageLoader::getHeight(), gcn::ImageLoader::getRawData(), and gcn::ImageLoader::getWidth(). |
|
This function frees an image. NOTE: There is generally no reason to call this function as it is called upon by the Image object when destroying an Image.
Implements gcn::ImageLoader. Definition at line 225 of file openglimageloader.cpp. |
|
Gets the height if the image.
Implements gcn::ImageLoader. Definition at line 242 of file openglimageloader.cpp. References gcn::ImageLoader::getHeight(). |
|
Gets the color of a pixel at coordinate x and y.
Implements gcn::ImageLoader. Definition at line 252 of file openglimageloader.cpp. References gcn::ImageLoader::getPixel(). |
|
Rreturns a pointer of raw data of an image. The raw data is in 32 bit RGBA format. The funcion will not free a prepared image, so finalize or discard should be used afterwards.
Implements gcn::ImageLoader. Definition at line 101 of file openglimageloader.cpp. References gcn::ImageLoader::getRawData(). |
|
Gets the width of an image.
Implements gcn::ImageLoader. Definition at line 232 of file openglimageloader.cpp. References gcn::ImageLoader::getWidth(). |
|
Prepares an image for reading. After you have called this function you can retrieve information about it and edit it.
Implements gcn::ImageLoader. Definition at line 91 of file openglimageloader.cpp. References gcn::ImageLoader::prepare(). |
|
Puts a pixel with a certain color at coordinate x and y.
Implements gcn::ImageLoader. Definition at line 262 of file openglimageloader.cpp. References gcn::ImageLoader::putPixel(). |
|
Set the host ImageLoader.
Definition at line 86 of file openglimageloader.cpp. |