![]() |
Public API Reference |
#include <texture.h>
Inheritance diagram for iTextureWrapper:
Public Methods | |
virtual iObject * | QueryObject ()=0 |
Get the iObject for this texture. More... | |
virtual iTextureWrapper * | Clone () const=0 |
Create a clone this texture wrapper, using the same texture handle. More... | |
virtual void | SetImageFile (iImage *Image)=0 |
Change the base iImage. More... | |
virtual iImage * | GetImageFile ()=0 |
Get the iImage. More... | |
virtual void | SetTextureHandle (iTextureHandle *tex)=0 |
Change the texture handle. More... | |
virtual iTextureHandle * | GetTextureHandle ()=0 |
Get the texture handle. More... | |
virtual void | SetKeyColor (int red, int green, int blue)=0 |
Set the transparent color. More... | |
virtual void | GetKeyColor (int &red, int &green, int &blue)=0 |
Query the transparent color. More... | |
virtual void | SetFlags (int flags)=0 |
Set the flags which are used to register the texture. More... | |
virtual int | GetFlags ()=0 |
Return the flags which are used to register the texture. More... | |
virtual void | Register (iTextureManager *txtmng)=0 |
Register the texture with the texture manager. More... | |
virtual void | SetUseCallback (iTextureCallback *callback)=0 |
Set a callback which is called just before the texture is used. More... | |
virtual iTextureCallback * | GetUseCallback ()=0 |
Get the use callback. More... | |
virtual void | Visit ()=0 |
Visit this texture. More... | |
virtual void | SetKeepImage (bool k)=0 |
Set the keep image flag. More... | |
virtual bool | KeepImage () const=0 |
If this flag is true then the image will be kept even after calling Register. More... |
Every texture in the engine is represented by a texture wrapper, which keeps the pointer to the texture handle, its name, and possibly the base image object.
Definition at line 56 of file iengine/texture.h.
|
Create a clone this texture wrapper, using the same texture handle.
|
|
Return the flags which are used to register the texture.
|
|
Get the iImage.
|
|
Query the transparent color.
|
|
Get the texture handle.
|
|
Get the use callback. If there are multiple use callbacks you can use this function to chain. |
|
If this flag is true then the image will be kept even after calling Register. If this flag is false then Register() will remove the image pointer from this texture wrapper. False by default. |
|
Get the iObject for this texture.
|
|
Register the texture with the texture manager.
|
|
Set the flags which are used to register the texture.
|
|
Change the base iImage. The changes will not be visible until the texture is registered again. |
|
Set the keep image flag. See KeepImage() function for explanation. |
|
Set the transparent color.
|
|
Change the texture handle. The changes will immediatly be visible. This will also change the key color and registration flags to those of the new texture and the iImage to NULL. |
|
Set a callback which is called just before the texture is used. This is mainly useful for procedural textures which can then choose to update their image. |
|
Visit this texture. This should be called by the engine right before using the texture. It is responsible for calling the use callback if there is one. |