csProcTexture Class Reference
Generic superclass for procedural textures. More...
#include <cstool/proctex.h>

Public Member Functions | |
virtual void | Animate (csTicks current_time)=0 |
Animate this texture. | |
void | DisableAutoUpdate () |
Disable auto-update. | |
virtual void | GetDimension (int &w, int &h) const |
get dimension | |
iTextureWrapper * | GetTextureWrapper () |
Get the texture corresponding with this procedural texture. | |
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. | |
virtual bool | Initialize (iObjectRegistry *object_reg) |
Do everything needed to initialize this texture. | |
virtual bool | PrepareAnim () |
Prepare the animation for use. | |
void | SetKeyColor (int red, int green, int blue) |
Set the key color to use for this texture. | |
Protected Member Functions | |
virtual iTextureWrapper * | CreateTexture (iObjectRegistry *object_reg) |
Create the actual texture wrapper. |
Detailed Description
Generic superclass for procedural textures.This class takes care of scheduling when a procedural texture needs updating.
Definition at line 64 of file proctex.h.
Member Function Documentation
virtual void csProcTexture::Animate | ( | csTicks | current_time | ) | [pure virtual] |
Animate this texture.
Subclasses of csProcTexture must implement this to implement some kind of animation on the procedural texture.
Implemented in csProcAnimated.
virtual iTextureWrapper* csProcTexture::CreateTexture | ( | iObjectRegistry * | object_reg | ) | [protected, virtual] |
Create the actual texture wrapper.
The default implementation creates a texture from proc_image if that is valid, or a texture of format "rgb8" otherwise. Override this function to realize different texture formats.
void csProcTexture::DisableAutoUpdate | ( | ) | [inline] |
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().
virtual void csProcTexture::GetDimension | ( | int & | w, | |
int & | h | |||
) | const [inline, virtual] |
iTextureWrapper* csProcTexture::GetTextureWrapper | ( | ) | [inline] |
iMaterialWrapper* csProcTexture::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.
This function assumes that the texture manager has already been set up. It is a convenience 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.
virtual bool csProcTexture::Initialize | ( | iObjectRegistry * | object_reg | ) | [virtual] |
Do everything needed to initialize this texture.
At this stage only will settings like the key color be used. The correct init sequence is:
Alternatively you can use Initialize(engine,name) which does all this work for you.
virtual bool csProcTexture::PrepareAnim | ( | ) | [virtual] |
void csProcTexture::SetKeyColor | ( | int | red, | |
int | green, | |||
int | blue | |||
) | [inline] |
The documentation for this class was generated from the following file:
- cstool/proctex.h
Generated for Crystal Space 1.4.0 by doxygen 1.5.8