![]() |
Public API Reference |
#include <proctex.h>
Inheritance diagram for csProcTexture:
Public Methods | |
void | DisableAutoUpdate () |
Disable auto-update. More... | |
virtual bool | Initialize (iObjectRegistry *object_reg) |
Do everything needed to initialize this texture. More... | |
iMaterialWrapper * | Initialize (iObjectRegistry *object_reg, iEngine *engine, iTextureManager *txtmgr, const char *name) |
Initialize this procedural texture, create a material associated with it, properly register the texture and material and prepare them. More... | |
virtual bool | PrepareAnim () |
Prepare the animation for use. More... | |
void | SetKeyColor (int red, int green, int blue) |
Set the key color to use for this texture. More... | |
virtual void | Animate (csTicks current_time)=0 |
Animate this texture. More... | |
iTextureWrapper * | GetTextureWrapper () |
Get the texture corresponding with this procedural texture. More... | |
virtual void | GetDimension (int &w, int &h) |
get dimension. More... |
This class takes care of scheduling when a procedural texture needs updating.
Definition at line 42 of file proctex.h.
|
Animate this texture. Subclasses of csProcTexture must implement this to implement some kind of animation on the procedural texture. Implemented in csProcDots. |
|
Disable auto-update. By default csProcTexture will register a callback so that every time the texture is visible Animate will automatically be called. If you don't want this and you want to call Animate on your own then you can disable this feature. You need to call DisableAutoUpdate() before calling Initialize(). |
|
get dimension.
|
|
Get the texture corresponding with this procedural texture.
|
|
Initialize this procedural texture, create a material associated with it, properly register the texture and material and prepare them. This function assumes that the texture manager has already been set up and PrepareTextures has already been called for the other loaded textures. It is a conveniance function that offers less flexibility but is sufficient for most cases. The texture and material will get the name that is given by this routine. |
|
Do everything needed to initialize this texture. At this stage only will settings like the key color be used. After Initialize has been called you can call Prepare() on the texture handle or PrepareTextures. The correct init sequence is: Alternatively you can use Initialize(engine,name) which does all this work for you. |
|
Prepare the animation for use. This needs to be done after the texture has been prepared. Reimplemented in csProcDots. |
|
Set the key color to use for this texture.
|