#include <RE_IconTextureCache.h>
|
| RE_IconTextureCache () |
|
| ~RE_IconTextureCache () |
|
RE_Texture * | addTexture (RE_Render *r, PXL_Raster *texture) |
| Add a regular texture from a raster and return its unique ID. More...
|
|
RE_Texture * | addMipMapTexture (RE_Render *r, PXL_Raster *texture) |
|
RE_Texture * | addMipMapTexture (RE_Render *r, const UT_Array< PXL_Raster * > &levels) |
|
void | removeTexture (RE_Texture *tex) |
| Remove a texture from the cache. More...
|
|
void | clearTextureCache () |
| Free all textures. More...
|
|
int | getTextureVersion () const |
|
void | renderTexture (RE_Render *r, int x, int y, int w, int h, RE_Texture *tex, float alpha, float z) |
| Render a given texture at (x, y) with width and height w, h. More...
|
|
void | beginTextureDefer (RE_Render *r) |
|
void | endTextureDefer (RE_Render *r) |
|
void | flushTextureDefer (RE_Render *r) |
|
int64 | getCacheSize () const |
|
Definition at line 55 of file RE_IconTextureCache.h.
RE_IconTextureCache::RE_IconTextureCache |
( |
| ) |
|
RE_IconTextureCache::~RE_IconTextureCache |
( |
| ) |
|
Add a texture from a raster, and automatically generate the mip-map levels for it.
Add a mip-mapped texture, with many levels defined by the rasters passed as levels, and return its unique ID. The levels must all be powers of two in size, and must follow the progression from 2^Nx2^N, 2^(N-1)x2^(N-1), ..., 1x1.
Add a regular texture from a raster and return its unique ID.
These methods record the textures to be drawn, and draws them all at once when endTextureDefer() is called. If you need all cached textures to be drawn immediately without doing an end, call flushTextureDefer().
void RE_IconTextureCache::clearTextureCache |
( |
| ) |
|
int64 RE_IconTextureCache::getCacheSize |
( |
| ) |
const |
|
inline |
int RE_IconTextureCache::getTextureVersion |
( |
| ) |
const |
|
inline |
Returns a version # for the cache; every time it is cleared, this number is bumped;
Definition at line 83 of file RE_IconTextureCache.h.
Remove a texture from the cache.
Render a given texture at (x, y) with width and height w, h.
The documentation for this class was generated from the following file: