#include <RendererTypes.h>
Inheritance diagram for TRendererTexture:
Public Member Functions | |
virtual EnumGraphicTextureType | GetType (void) const =0 |
Returns type of texture. | |
virtual void | GetTypeImage (TRendererTextureImage **dest)=0 |
Returns texture of type GRAPH_TEXTYPE_IMAGE if this texture is stored in this object. | |
virtual void | GetTypeCube (TRendererTextureCube **dest)=0 |
Returns texture of type GRAPH_TEXTYPE_CUBE if this texture is stored in this object. | |
virtual void | Duplicate (TRendererTexture **dest)=0 |
Duplicate pointer to this object to another one and increase number of references to it. | |
virtual DWORD | GetRefs (void) const =0 |
Returns number of references to this texture. | |
virtual DWORD | AddRefs (void)=0 |
Increases number of references and returns result. | |
virtual DWORD | Release (void)=0 |
Decreases number of references to this texture and return result. | |
virtual BOOL | IsDynamic (void) const |
Determines whether this texture is dynamic. | |
virtual BOOL | IsRenderTarget (void) const =0 |
Determines whether surfaces from this texture may be used as render targets to renderer device. | |
virtual BOOL | IsLockable (void) const =0 |
Determines whether this texture may be locked and read/overwrite. | |
virtual BOOL | IsRenderable (void) const =0 |
Determines whether this texture may be used for rendering. | |
virtual BOOL | IsVolatile (void) const =0 |
Determines whether this texture must recreated after renderer is lost. | |
virtual EnumGraphicPool | GetPool (void) const =0 |
Returns pool where this texture is stored. | |
virtual EnumGraphicFormat | GetPixelFormat (void) const =0 |
Returns pixel format of this texture. |
No instance of this class can be created, this class serves as baseclass for instanciable texture classes.
From pointers to this class may be created pointers to correct texture type via methods like GetTypeImage(),GetTypeCube().
Not all textures can be used for rendering, only these which are created in VIDEO or MANAGED (no support for SYSTEM). For this reason you must call method IsRenderable() to determine whether texture can be used in texture stage.
Also not all textures can be locked for reading and writing, thus you must check this via method IsLockable().
All textures are consists from TRendererSurface objects - each for one mipmap in texture. You can get pointer to surface but notice texture is allocated until all references to it and all its surfaces are non-zero!!!
Definition at line 882 of file RendererTypes.h.
|
Increases number of references and returns result.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Duplicate pointer to this object to another one and increase number of references to it. This method does the same as copying two pointers and increasing number of references with calling AddRefs().
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Returns pixel format of this texture.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Returns pool where this texture is stored.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Returns number of references to this texture.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Returns type of texture.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Returns texture of type GRAPH_TEXTYPE_CUBE if this texture is stored in this object. Before calling this method GetType() should be called for determining if texture type is GRAPH_TEXTYPE_CUBE. If texture has another type then NULL is returned. If texture has right type then number of refernces is increased and pointer to texture is returned.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Returns texture of type GRAPH_TEXTYPE_IMAGE if this texture is stored in this object. Before calling this method GetType() should be called for determining if texture type is GRAPH_TEXTYPE_IMAGE. If texture has another type then NULL is returned. If texture has right type then number of references is increased and pointer to texture is returned.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Determines whether this texture is dynamic.
Reimplemented in TRendererTextureImage, and TRendererTextureCube. |
|
Determines whether this texture may be locked and read/overwrite. Only textures created as MANAGED or in system RAM may be modified directly, textures in VIDEO memory must be modified with special method from renderer or cannot be modified. For getting type of texture pool see EnumGraphicPool and GetPool() method. Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Determines whether this texture may be used for rendering. Only textures created as MANAGED or in VIDEO memory may be used for rendering, textures in SYSTEM memory cannot be used for rendering. For getting type of texture pool see EnumGraphicPool and GetPool() method. Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Determines whether surfaces from this texture may be used as render targets to renderer device.
Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Determines whether this texture must recreated after renderer is lost. Remark: Only resources in VIDEO memory must be recreated thus you must hold their backup copy in your program!!! Implemented in TRendererTextureImage, and TRendererTextureCube. |
|
Decreases number of references to this texture and return result. If number of references count zero then texture is destroyed via operator delete. After calling this method pointer is invalid and must be set to NULL. Implemented in TRendererTextureImage, and TRendererTextureCube. |