TRendererTexture Class Reference

This class represents texture from graphic device. More...

#include <RendererTypes.h>

Inheritance diagram for TRendererTexture:

Inheritance graph
[legend]
List of all members.

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.

Detailed Description

This class represents texture from graphic device.

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.


Member Function Documentation

virtual DWORD TRendererTexture::AddRefs void   )  [pure virtual]
 

Increases number of references and returns result.

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual void TRendererTexture::Duplicate TRendererTexture **  dest  )  [pure virtual]
 

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().

Parameters:
dest [out] adress of pointer to store result

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual EnumGraphicFormat TRendererTexture::GetPixelFormat void   )  const [pure virtual]
 

Returns pixel format of this texture.

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual EnumGraphicPool TRendererTexture::GetPool void   )  const [pure virtual]
 

Returns pool where this texture is stored.

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual DWORD TRendererTexture::GetRefs void   )  const [pure virtual]
 

Returns number of references to this texture.

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual EnumGraphicTextureType TRendererTexture::GetType void   )  const [pure virtual]
 

Returns type of texture.

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual void TRendererTexture::GetTypeCube TRendererTextureCube **  dest  )  [pure virtual]
 

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.

Parameters:
dest [out] adress of pointer to store result

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual void TRendererTexture::GetTypeImage TRendererTextureImage **  dest  )  [pure virtual]
 

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.

Parameters:
dest [out] adress of pointer to store result

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual BOOL TRendererTexture::IsDynamic void   )  const [virtual]
 

Determines whether this texture is dynamic.

Reimplemented in TRendererTextureImage, and TRendererTextureCube.

virtual BOOL TRendererTexture::IsLockable void   )  const [pure virtual]
 

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.

virtual BOOL TRendererTexture::IsRenderable void   )  const [pure virtual]
 

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.

virtual BOOL TRendererTexture::IsRenderTarget void   )  const [pure virtual]
 

Determines whether surfaces from this texture may be used as render targets to renderer device.

Implemented in TRendererTextureImage, and TRendererTextureCube.

virtual BOOL TRendererTexture::IsVolatile void   )  const [pure virtual]
 

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.

virtual DWORD TRendererTexture::Release void   )  [pure virtual]
 

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.


The documentation for this class was generated from the following file:
Generated on Wed Nov 28 22:43:45 2007 for Joy4D by  doxygen 1.4.6-NO