TRendererTextureCube Class Reference

This class represents cubemap texture (six textures in cube). More...

#include <RendererTypes.h>

Inheritance diagram for TRendererTextureCube:

Inheritance graph
[legend]
Collaboration diagram for TRendererTextureCube:

Collaboration 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.
virtual DWORD GetWidth (void) const =0
 Returns width of largest texture surface (mipmap at level 0).
virtual DWORD GetHeight (void) const =0
 Returns height of largest texture surface (mipmap at level 0).
virtual void Duplicate (TRendererTextureCube **dest)=0
 Duplicate pointer to this object to another one and increase number of references to it.
virtual DWORD GetSurfaceCount (void) const =0
 Returns number of mipmap levels in each side of cubemap.
virtual void GetSurface (EnumGraphicCubemapFaces face, const DWORD &level, TRendererSurface **dest) const =0
 Returns pointer to specified surface in texture.
virtual BOOL UpdateTextureCube (EnumGraphicCubemapFaces face, const TGraphicTexture *source)=0
 Updates specified side of this cubemap with data from software texture.
virtual BOOL ReadTextureCube (EnumGraphicCubemapFaces face, TGraphicTexture *destination)=0
 Reads data from specified side of this renderer cubemap texture and store it in software texture.
virtual BOOL UpdateRenderTargetTextureCube (EnumGraphicCubemapFaces face, TRendererTextureImage *source)=0
 Updates one side from render-target texture with data from texture created in RAM pool.
virtual BOOL ReadRenderTargetTextureCube (EnumGraphicCubemapFaces face, TRendererTextureImage *destination)=0
 Reads one side from this render-target texture and data store into texture created in RAM pool.

Detailed Description

This class represents cubemap texture (six textures in cube).

All six textures have the same type, dimension, pixel format etc. Although cubemaps are consist from six textures there is no array of textures, but six array of surfaces. Cubemap sides must be rectangular!

Object of this class can be created only from TRenderer class and destroyed only via Release(). Class has reference counting thus you must properly use AddRefs() method when set pointers to this class. This class has no method to set members, members must be set directly.

Definition at line 1151 of file RendererTypes.h.


Member Function Documentation

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

Increases number of references and returns result.

Implements TRendererTexture.

virtual void TRendererTextureCube::Duplicate TRendererTextureCube **  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

virtual void TRendererTextureCube::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

Implements TRendererTexture.

virtual DWORD TRendererTextureCube::GetHeight void   )  const [pure virtual]
 

Returns height of largest texture surface (mipmap at level 0).

For width of surface at others mipmap levels you must get pointer to surface with calling GetSurface() and from this pointer get width. In cubemap texture width has the same value as height.

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

Returns pixel format of this texture.

Implements TRendererTexture.

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

Returns pool where this texture is stored.

Implements TRendererTexture.

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

Returns number of references to this texture.

Implements TRendererTexture.

virtual void TRendererTextureCube::GetSurface EnumGraphicCubemapFaces  face,
const DWORD level,
TRendererSurface **  dest
const [pure virtual]
 

Returns pointer to specified surface in texture.

If the method succeeds, then returns pointer to surface and increases number of references to it. Otherwise returns NULL. Index must be in range (0,GetSurfaceCount()-1).

Parameters:
face [in] index of specified face in cubemap
level [in] zero-based index of surface to return
dest [out]adress of pointer to store result

virtual DWORD TRendererTextureCube::GetSurfaceCount void   )  const [pure virtual]
 

Returns number of mipmap levels in each side of cubemap.

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

Returns type of texture.

Implements TRendererTexture.

virtual void TRendererTextureCube::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

Implements TRendererTexture.

virtual void TRendererTextureCube::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 refernces is increased and pointer to texture is returned.

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

Implements TRendererTexture.

virtual DWORD TRendererTextureCube::GetWidth void   )  const [pure virtual]
 

Returns width of largest texture surface (mipmap at level 0).

For width of surface at others mipmap levels you must get pointer to surface with calling GetSurface() and from this pointer get width. In cubemap texture width has the same value as height.

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

Determines whether this texture is dynamic.

Reimplemented from TRendererTexture.

virtual BOOL TRendererTextureCube::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.

Implements TRendererTexture.

virtual BOOL TRendererTextureCube::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.

Implements TRendererTexture.

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

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

Implements TRendererTexture.

virtual BOOL TRendererTextureCube::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!!!

Implements TRendererTexture.

virtual BOOL TRendererTextureCube::ReadRenderTargetTextureCube EnumGraphicCubemapFaces  face,
TRendererTextureImage destination
[pure virtual]
 

Reads one side from this render-target texture and data store into texture created in RAM pool.

This source texture must be render-target type, thus must be created in VIDEO pool. Destination texture must be created in RAM memory. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. This method call methods for surface updating.

Parameters:
face [in] valid cubemap face
destination [in] destination renderer texture created in SYSTEM pool

virtual BOOL TRendererTextureCube::ReadTextureCube EnumGraphicCubemapFaces  face,
TGraphicTexture destination
[pure virtual]
 

Reads data from specified side of this renderer cubemap texture and store it in software texture.

Renderer texture must be lockable and must be created in RAM or MANAGED pool. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. Destination texture must be valid - see TGraphicSurface::IsLoaded() method. This method call methods for surface updating.

Parameters:
face [in] source cubemap side
destination [in] destination software texture - must be valid

virtual DWORD TRendererTextureCube::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.

Implements TRendererTexture.

virtual BOOL TRendererTextureCube::UpdateRenderTargetTextureCube EnumGraphicCubemapFaces  face,
TRendererTextureImage source
[pure virtual]
 

Updates one side from render-target texture with data from texture created in RAM pool.

This destination texture must be render-target type, thus must be created in VIDEO pool. Source texture must be created in RAM memory. Both textures must have identical format, number mipmap levels and dimensions for each mipmap. This method call methods for surface updating.

Parameters:
face [in] valid cubemap face
source [in] source renderer texture created in SYSTEM pool

virtual BOOL TRendererTextureCube::UpdateTextureCube EnumGraphicCubemapFaces  face,
const TGraphicTexture source
[pure virtual]
 

Updates specified side of this cubemap with data from software texture.

Cubemap texture must be lockable and must be created in RAM or MANAGED pool. Both textures must have identical format, number mipmap levels and dimensions for each mipmap (side of cubemap). Source texture must be valid - see TGraphicSurface::IsLoaded() method. This method call methods for surface updating.

Parameters:
face [in] destination cubemap side
source [in] source software texture - must be valid


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