Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ManagedOgreRenderTexturePass Class Reference

ManagedOgreRenderTexturePass encapsulates a hardware accelerated GPU driven render-to-texture pass. More...

#include <ManagedOgreRenderTexturePass.h>

Inheritance diagram for ManagedOgreRenderTexturePass:

EmissionMapPassManager EnvMapFinalGatheringPass EnvMapPass FilteringPass FinalRenderingPass IBLBlendAddIllumPass IBLDepthMapPass IBLRenderBlackPass IterationVisibilityMapPass NormalMapPass OrigVismapPass PhotonMapFilteringPass RadAveragingPass RadiosityMapPass RadiosityMipmapPass RenderCubeMapColorDistancePass RenderCubeMapUVPass RenderDepthBufferPass RenderFinalPass RenderGeometryPass RenderPhotonHitPass RenderPhotonUVMapPass RenderRefractObjectMapPass RenderUmbraPass SearchEndPass SearchPass SearchStartPass List of all members.

Public Member Functions

void addRenderTarget (RenderTarget *renderTarget, CubeMapFaces cubeMapFace)
 Adds a render target to the render target queue. For multiple render targets. For cube map texture render targets.
void addRenderTarget (RenderTarget *renderTarget)
 Adds a render target to the render target queue. For multiple render targets.
bool changeMaterial (String &materialName, StringVector &newTextureNames, bool useOldTextureNames=false)
bool changeTexture (const String &textureName, unsigned short textureUnit)
void clearRenderTargets ()
 Clears the render target list.
Camera * getCamera ()
virtual const String & getMaterialName ()
 Retrieves the name of the material used in the pass.
RenderTexture * getRenderTexture ()
const String & getRenderTextureName ()
std::vector< TextureUnitState * > * getTextureUnitStates ()
 ManagedOgreRenderTexturePass (Root *mRoot, const String &renderTextureName, unsigned int width, unsigned int height, TextureType texType=TEX_TYPE_2D, PixelFormat internalFormat=PF_X8R8G8B8, const NameValuePairList *miscParams=0, bool fullScreenQuadRenderer=false)
 Constructor.
virtual void oneTimeRenderToTextureSetup (String &materialName, StringVector &textureNames)
 Creates render to texture objects.
void removeRenderTargetByName (const String &renderTargetName)
 Removes a render target from the list of render targets.
void setCamera (Camera *camera)
virtual void setMaterialName (const String &materialName)
 Changes the material of the pass.
virtual void update (NameValuePairList *startParams=0, NameValuePairList *endParams=0)
 Updates the render-texture.
virtual ~ManagedOgreRenderTexturePass ()

Static Public Attributes

static const char * noRenderTargetName

Protected Member Functions

virtual void createFullScreenQuad ()
 Creates a full screen quad for FSQ rendering.
virtual void entityMaterialCleanup ()
 Controls the cleanup of entities. It is called from update before onRenderEnd.
virtual void entityMaterialSetup ()
 Controls the setup of entities. It is called from update after onRenderStart.
virtual void onRenderEnd (NameValuePairList *namedParams=0)
 Runs after the render-texture object is updated place all cleanup code here.
virtual void onRenderStart (NameValuePairList *namedParams=0)
 Runs before the render-texture object is updated place all shader setup here.

Protected Attributes

std::vector< CubeMapFaces > cubeMapFaces
 A list of cube map faces to use for Cube map RT-s.
EffectWrappereffectWrapper
 EffectWrapper for convinient shader setup.
std::vector< bool > entityVisibilityList
 A list to hold all visibility information for entities.
bool fullScreenQuadRenderer
 Shows if we are rendering a full screen quad.
Root * mRoot
 Pointer to the current ogre root.
SceneManager * mSceneMgr
 Pointer to the current Ogre SceneManager.
RenderSystem * renderSystem
 Pointer to the current Ogre RenderSystem.
std::vector< RenderTarget * > renderTargets
 A list of render targets to use in the pass. For MRT-s.
RenderTexture * renderTexture
 The pointer to the pass's own render texture object.
StringVector textureNames
 List of texture names used in the pass.
std::vector< TextureUnitState * > usedTextureUnitStates
 List of texture units.

Static Protected Attributes

static MovablePlane * fullScreenQuad
 MovablePlane instance for full screen quad.
static Entity * fullScreenQuadEntity
 Entity to hold the full screen quad.
static SceneNode * fullScreenQuadSceneNode
 SceneNode instance for full screen quad.

Detailed Description

ManagedOgreRenderTexturePass encapsulates a hardware accelerated GPU driven render-to-texture pass.


Constructor & Destructor Documentation

ManagedOgreRenderTexturePass Root *  mRoot,
const String &  renderTextureName,
unsigned int  width,
unsigned int  height,
TextureType  texType = TEX_TYPE_2D,
PixelFormat  internalFormat = PF_X8R8G8B8,
const NameValuePairList *  miscParams = 0,
bool  fullScreenQuadRenderer = false
 

Constructor.

Parameters:
mRoot The current ogre root object.
renderTextureName The name of the render texture instance to create. Set to ManagedOgreRenderTexturePass::
width The width of the render texture instance
height The height of the render texture instance
texType The texture type of the render texture instance
internalFormat The pixel format of the render texture instance
miscParams All non standard parameters of the render texture instance
fullScreenQuadRenderer Defines full screen quad rendering.

virtual ~ManagedOgreRenderTexturePass  )  [inline, virtual]
 

Destructor.


Member Function Documentation

void addRenderTarget RenderTarget *  renderTarget,
CubeMapFaces  cubeMapFace
[inline]
 

Adds a render target to the render target queue. For multiple render targets. For cube map texture render targets.

Parameters:
renderTarget Pointer to the render target to add.
cubeMapFace The cube map face for cube map render targets.

void addRenderTarget RenderTarget *  renderTarget  )  [inline]
 

Adds a render target to the render target queue. For multiple render targets.

Parameters:
renderTarget Pointer to the render target to add.

bool changeMaterial String &  materialName,
StringVector &  newTextureNames,
bool  useOldTextureNames = false
 

Parameters:
materialName Name of the specific material to create.
newTextureNames A list of texture names to set.
useOldTextureNames Shows whether to use old texture names or not.
Returns:
true if texture could be set for the specific texture unit.

bool changeTexture const String &  textureName,
unsigned short  textureUnit
 

Parameters:
textureName Name of the specific texture to set.
textureUnit Number of the texture unit to set.
Returns:
true if texture could be set for the specific texture unit.

void clearRenderTargets  )  [inline]
 

Clears the render target list.

virtual void createFullScreenQuad  )  [protected, virtual]
 

Creates a full screen quad for FSQ rendering.

virtual void entityMaterialCleanup  )  [protected, virtual]
 

Controls the cleanup of entities. It is called from update before onRenderEnd.

Reimplemented in EnvMapPass.

virtual void entityMaterialSetup  )  [protected, virtual]
 

Controls the setup of entities. It is called from update after onRenderStart.

Reimplemented in EnvMapPass.

Camera* getCamera  )  [inline]
 

Returns:
Current camera.

virtual const String& getMaterialName  )  [inline, virtual]
 

Retrieves the name of the material used in the pass.

Returns:
The name of the material in use.

RenderTexture* getRenderTexture  )  [inline]
 

Returns:
Returns render-to-texture object pointer.

const String& getRenderTextureName  )  [inline]
 

Returns:
Returns render-to-texture object name.

std::vector<TextureUnitState*>* getTextureUnitStates  )  [inline]
 

Returns:
A list of texture unit states.

virtual void oneTimeRenderToTextureSetup String &  materialName,
StringVector &  textureNames
[virtual]
 

Creates render to texture objects.

Parameters:
materialName Name of material to create
textureNames The names of the textures to use.

virtual void onRenderEnd NameValuePairList *  namedParams = 0  )  [inline, protected, virtual]
 

Runs after the render-texture object is updated place all cleanup code here.

Parameters:
namedParams Contains named parameters for rendering end.

Reimplemented in EmissionMapPassManager, FinalRenderingPass, IBLBlendAddIllumPass, IBLDepthMapPass, IBLRenderBlackPass, IterationVisibilityMapPass, NormalMapPass, OrigVismapPass, PhotonMapFilteringPass, RadAveragingPass, RadiosityMapPass, RadiosityMipmapPass, RenderCubeMapColorDistancePass, RenderCubeMapUVPass, RenderFinalPass, RenderPhotonHitPass, RenderPhotonUVMapPass, RenderRefractObjectMapPass, RenderUmbraPass, SearchEndPass, SearchPass, SearchStartPass, EnvMapFinalGatheringPass, EnvMapPass, FilteringPass, RenderDepthBufferPass, and RenderGeometryPass.

virtual void onRenderStart NameValuePairList *  namedParams = 0  )  [inline, protected, virtual]
 

Runs before the render-texture object is updated place all shader setup here.

Parameters:
namedParams A list of named parameters for rendering setup.

Reimplemented in EmissionMapPassManager, FinalRenderingPass, IBLBlendAddIllumPass, IBLDepthMapPass, IBLRenderBlackPass, IterationVisibilityMapPass, NormalMapPass, OrigVismapPass, PhotonMapFilteringPass, RadAveragingPass, RadiosityMapPass, RadiosityMipmapPass, RenderCubeMapColorDistancePass, RenderCubeMapUVPass, RenderFinalPass, RenderPhotonHitPass, RenderPhotonUVMapPass, RenderRefractObjectMapPass, RenderUmbraPass, SearchEndPass, SearchPass, SearchStartPass, EnvMapFinalGatheringPass, EnvMapPass, FilteringPass, RenderDepthBufferPass, and RenderGeometryPass.

void removeRenderTargetByName const String &  renderTargetName  )  [inline]
 

Removes a render target from the list of render targets.

Parameters:
renderTargetName The name of the render target to remove.

void setCamera Camera *  camera  )  [inline]
 

Parameters:
camera Camera camera to set.

virtual void setMaterialName const String &  materialName  )  [inline, virtual]
 

Changes the material of the pass.

Parameters:
materialName The name of the material to use.

virtual void update NameValuePairList *  startParams = 0,
NameValuePairList *  endParams = 0
[virtual]
 

Updates the render-texture.

Parameters:
startParams Starting parameters for the rendering pass.
endParams Ending parameters for the rendering pass.


Member Data Documentation

std::vector<CubeMapFaces> cubeMapFaces [protected]
 

A list of cube map faces to use for Cube map RT-s.

EffectWrapper* effectWrapper [protected]
 

EffectWrapper for convinient shader setup.

std::vector<bool> entityVisibilityList [protected]
 

A list to hold all visibility information for entities.

MovablePlane* fullScreenQuad [static, protected]
 

MovablePlane instance for full screen quad.

Entity* fullScreenQuadEntity [static, protected]
 

Entity to hold the full screen quad.

bool fullScreenQuadRenderer [protected]
 

Shows if we are rendering a full screen quad.

SceneNode* fullScreenQuadSceneNode [static, protected]
 

SceneNode instance for full screen quad.

Root* mRoot [protected]
 

Pointer to the current ogre root.

SceneManager* mSceneMgr [protected]
 

Pointer to the current Ogre SceneManager.

const char* noRenderTargetName [static]
 

If the name of the render target equals this String, then no render target is created.

RenderSystem* renderSystem [protected]
 

Pointer to the current Ogre RenderSystem.

std::vector<RenderTarget*> renderTargets [protected]
 

A list of render targets to use in the pass. For MRT-s.

RenderTexture* renderTexture [protected]
 

The pointer to the pass's own render texture object.

StringVector textureNames [protected]
 

List of texture names used in the pass.

std::vector<TextureUnitState*> usedTextureUnitStates [protected]
 

List of texture units.


The documentation for this class was generated from the following file:
Generated on Mon Apr 18 10:59:27 2005 for OGRE_IllumModule by  doxygen 1.4.2