#include <RE_RasterObject.h>
Public Member Functions | |
| RE_RasterObject (RE_RenderCallback callback, int w, int h, int tw, int th, void *data) | |
| ~RE_RasterObject () | |
| void | resetBuffer () |
| bool | build (RE_Render *r) |
| Render offscreen, calling the render callback. | |
| RE_Texture * | getTexture (RE_Render *r) |
| void | rebuild (RE_Render *r) |
| If the color scheme changes, we need to re-render everything. | |
| bool | isBuilt () const |
| Whether build() has successfully been called. | |
| int | getTexWidth () const |
| The texture's width. Should be a power of two. | |
| int | getTexHeight () const |
| The texture's height. Should be a power of two. | |
| int | getWidth () const |
| The width of what you actually want to render. | |
| int | getHeight () const |
| The height of what you actually want to render. | |
| void | setForceRaster (bool on) |
| Force PXL_Raster creation. | |
| TIL_Raster * | getRaster () |
| void | renderDirect (RE_Render *r, int x, int y, int w, int h) |
| Renders this object directly using the callback. | |
Definition at line 51 of file RE_RasterObject.h.
| RE_RasterObject::RE_RasterObject | ( | RE_RenderCallback | callback, | |
| int | w, | |||
| int | h, | |||
| int | tw, | |||
| int | th, | |||
| void * | data | |||
| ) |
Provide this class with a callback, the width and height you want to render into, the height and width you want the texture to be (this should be a power of two), and some data to be passed to the callback.
| RE_RasterObject::~RE_RasterObject | ( | ) |
Be very careful before calling this - do you have an OpenGL context pushed?
| bool RE_RasterObject::build | ( | RE_Render * | r | ) |
Render offscreen, calling the render callback.
| int RE_RasterObject::getHeight | ( | ) | const |
The height of what you actually want to render.
| TIL_Raster* RE_RasterObject::getRaster | ( | ) | [inline] |
Definition at line 103 of file RE_RasterObject.h.
| int RE_RasterObject::getTexHeight | ( | ) | const |
The texture's height. Should be a power of two.
| RE_Texture* RE_RasterObject::getTexture | ( | RE_Render * | r | ) |
Generate and get the OpenGL ID of a texture that contains the contents of what was render when build() was called.
| int RE_RasterObject::getTexWidth | ( | ) | const |
The texture's width. Should be a power of two.
| int RE_RasterObject::getWidth | ( | ) | const |
The width of what you actually want to render.
| bool RE_RasterObject::isBuilt | ( | ) | const |
Whether build() has successfully been called.
| void RE_RasterObject::rebuild | ( | RE_Render * | r | ) |
If the color scheme changes, we need to re-render everything.
| void RE_RasterObject::renderDirect | ( | RE_Render * | r, | |
| int | x, | |||
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) |
Renders this object directly using the callback.
| void RE_RasterObject::resetBuffer | ( | ) |
Frees the offscreen buffer associated with this object without clearing the other data (texture, raster).
| void RE_RasterObject::setForceRaster | ( | bool | on | ) | [inline] |
1.5.9