CrystalSpace

Public API Reference

CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator Struct Reference

Helper to manage shader pass activation/setup/teardown/deactivation. More...

#include <csplugincommon/rendermanager/render.h>

List of all members.

Public Member Functions

bool ActivateNextPass ()
 Activate the next pass in the shader.
void BeginPassIteration ()
 Start an iteration over the passes of the currently active shader.
void DeactivatePass ()
 Deactivate the current pass (if it was activated).
void EndPassIteration ()
 End the currently active shader pass iteration.
iShaderGetShader () const
 Get the currently active shader.
size_t GetTicket () const
 Get the currently active ticket.
bool IsNewShader (iShader *shader, size_t ticket) const
 Returns whether the given shader/ticket combo differs from the current.
void SetShader (iShader *shader, size_t ticket)
 Change the currently active shader&ticket.
bool SetupPass (const CS::Graphics::RenderMesh *mesh, CS::Graphics::RenderMeshModes &modes, const csShaderVariableStack &stack)
 Setup the current pass in the shader.
void TeardownPass ()
 Tear down the current pass (if it was set up).
void UnsetShader ()
 Unset the currently active shader.

Public Attributes

iShadercurrentShader
 Currently used shader.
size_t currentTicket
 Current shader ticket.
csRef< iShaderPassesActivatorshaderActivator
 The used shader activator, if an activation is in progress.

Detailed Description

template<typename RenderTree>
struct CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator

Helper to manage shader pass activation/setup/teardown/deactivation.

Definition at line 123 of file render.h.


Member Function Documentation

template<typename RenderTree >
bool CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::ActivateNextPass (  )  [inline]

Activate the next pass in the shader.

Returns:
Whether the activation was successful (and rendering should proceed).
Note:
Also handles deactivation/teardown of a previous pass.

Definition at line 200 of file render.h.

template<typename RenderTree >
void CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::BeginPassIteration (  )  [inline]

Start an iteration over the passes of the currently active shader.

Definition at line 183 of file render.h.

template<typename RenderTree >
void CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::DeactivatePass (  )  [inline]

Deactivate the current pass (if it was activated).

Definition at line 138 of file render.h.

template<typename RenderTree >
void CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::EndPassIteration (  )  [inline]

End the currently active shader pass iteration.

Note:
Called implicitly.

Definition at line 191 of file render.h.

template<typename RenderTree >
iShader* CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::GetShader (  )  const [inline]

Get the currently active shader.

Definition at line 157 of file render.h.

template<typename RenderTree >
size_t CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::GetTicket (  )  const [inline]

Get the currently active ticket.

Definition at line 159 of file render.h.

template<typename RenderTree >
bool CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::IsNewShader ( iShader shader,
size_t  ticket 
) const [inline]

Returns whether the given shader/ticket combo differs from the current.

Definition at line 151 of file render.h.

template<typename RenderTree >
void CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::SetShader ( iShader shader,
size_t  ticket 
) [inline]

Change the currently active shader&ticket.

Definition at line 162 of file render.h.

template<typename RenderTree >
bool CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::SetupPass ( const CS::Graphics::RenderMesh mesh,
CS::Graphics::RenderMeshModes modes,
const csShaderVariableStack stack 
) [inline]

Setup the current pass in the shader.

Returns:
Whether the setup was successful (and rendering should proceed).
Note:
Also handles teardown of a previous pass.

Definition at line 209 of file render.h.

template<typename RenderTree >
void CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::TeardownPass (  )  [inline]

Tear down the current pass (if it was set up).

Definition at line 133 of file render.h.

template<typename RenderTree >
void CS::RenderManager::RenderCommon< RenderTree >::ShaderActivator::UnsetShader (  )  [inline]

Unset the currently active shader.

Note:
Called implicitly.

Definition at line 177 of file render.h.


Member Data Documentation

Currently used shader.

Definition at line 126 of file render.h.

Current shader ticket.

Definition at line 128 of file render.h.

The used shader activator, if an activation is in progress.

Definition at line 130 of file render.h.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.1 by doxygen 1.6.1