#include <cswstex.h>
Public Methods | |
| csWSTexture (const char *iName, iImage *Image, int iFlags) | |
| Create the 2D texture. | |
| ~csWSTexture () | |
| Destroy the texture object. | |
| void | SetKeyColor (int iR, int iG, int iB) |
| Set texture transparent color. | |
| void | SetKeyColor (bool iEnable) |
| Set whenever texture has transparent holes or not. | |
| void | GetKeyColor (int &oR, int &oG, int &oB) |
| Get texture transparent color. | |
| bool | HasKeyColor () |
| Query whenever texture has transparent areas. | |
| void | Register (iTextureManager *iTexMan) |
| Register the texture with texture manager. | |
| void | Unregister () |
| Unregister the texture. | |
| void | Refresh () |
| Refresh the texture in video memory (do iTexMan->PrepareTexture ()). | |
| void | SetName (const char *iName) |
| Define texture name. | |
| const char* | GetName () |
| Get texture name. | |
| iTextureHandle* | GetHandle () |
| CSWS uses its own reference counting system. | |
| void | IncRef () |
| Increment reference count to this texture. | |
| void | DecRef () |
| Delete a reference to this texture. | |
| int | GetRefCount () const |
| Return reference count. | |
| const char* | GetFileName () const |
| Get texture file name. | |
| void | SetFileName (const char *iFileName) |
| Set texture file name. | |
| void | FixKeyColor () |
| Find nearest transparent color in image. | |
| void | DontFixKeyColor () |
| Tell texture that transparent color has already been fixed. | |
| int | GetWidth () |
| Query texture width. | |
| int | GetHeight () |
| Query texture height. | |
The application keeps an array of such objects, and they are registered with the 3D and 2D drivers as soon as app->RegisterTextures() is called.