HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RE_RasterObject Class Reference

#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. More...
 
RE_TexturegetTexture (RE_Render *r)
 
void rebuild (RE_Render *r)
 If the color scheme changes, we need to re-render everything. More...
 
bool isBuilt () const
 Whether build() has successfully been called. More...
 
int getTexWidth () const
 The texture's width. Should be a power of two. More...
 
int getTexHeight () const
 The texture's height. Should be a power of two. More...
 
int getWidth () const
 The width of what you actually want to render. More...
 
int getHeight () const
 The height of what you actually want to render. More...
 
void setForceRaster (bool on)
 Force PXL_Raster creation. More...
 
TIL_RastergetRaster ()
 
void renderDirect (RE_Render *r, int x, int y, int w, int h)
 Renders this object directly using the callback. More...
 

Detailed Description

Definition at line 34 of file RE_RasterObject.h.

Constructor & Destructor Documentation

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?

Member Function Documentation

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 86 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

Force PXL_Raster creation.

Definition at line 84 of file RE_RasterObject.h.


The documentation for this class was generated from the following file: