Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iTextureWrapper Struct Reference

A texture wrapper is an engine-level object that wraps around an actual texture (iTextureHandle). More...

#include <texture.h>

Inheritance diagram for iTextureWrapper:

iBase List of all members.

Public Methods

virtual iObjectQueryObject ()=0
 Get the iObject for this texture.

virtual iTextureWrapper* Clone () const=0
 Create a clone this texture wrapper, using the same texture handle.

virtual void SetImageFile (iImage *Image)=0
 Change the base iImage. More...

virtual iImageGetImageFile ()=0
 Get the iImage.

virtual void SetTextureHandle (iTextureHandle *tex)=0
 Change the texture handle. More...

virtual iTextureHandleGetTextureHandle ()=0
 Get the texture handle.

virtual void SetKeyColor (int red, int green, int blue)=0
 Set the transparent color.

virtual void GetKeyColor (int &red, int &green, int &blue)=0
 Query the transparent color.

virtual void SetFlags (int flags)=0
 Set the flags which are used to register the texture.

virtual int GetFlags ()=0
 Return the flags which are used to register the texture.

virtual void Register (iTextureManager *txtmng)=0
 Register the texture with the texture manager.

virtual void SetUseCallback (iTextureCallback *callback)=0
 Set a callback which is called just before the texture is used. More...

virtual iTextureCallbackGetUseCallback ()=0
 Get the use callback. More...

virtual void Visit ()=0
 Visit this texture. More...


Detailed Description

A texture wrapper is an engine-level object that wraps around an actual texture (iTextureHandle).

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.


Member Function Documentation

iTextureCallback * iTextureWrapper::GetUseCallback ( ) [pure virtual]
 

Get the use callback.

If there are multiple use callbacks you can use this function to chain.

void iTextureWrapper::SetImageFile ( iImage * Image ) [pure virtual]
 

Change the base iImage.

The changes will not be visible until the texture is registered again.

void iTextureWrapper::SetTextureHandle ( iTextureHandle * tex ) [pure virtual]
 

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.

void iTextureWrapper::SetUseCallback ( iTextureCallback * callback ) [pure virtual]
 

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.

void iTextureWrapper::Visit ( ) [pure virtual]
 

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.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000