CrystalSpace

Public API Reference

CS::RenderManager::AutoFX::FramebufferTex< RenderTree > Class Template Reference

Render manager helper for automatic framebuffer content textures. More...

#include <csplugincommon/rendermanager/autofx_framebuffertex.h>

Inheritance diagram for CS::RenderManager::AutoFX::FramebufferTex< RenderTree >:

List of all members.

Public Member Functions

void operator() (typename RenderTree::MeshNode *node, size_t layer, typename RenderTree::MeshNode::SingleMesh &mesh, const csBitArray &names)
 Operator doing the actual work.

Detailed Description

template<typename RenderTree>
class CS::RenderManager::AutoFX::FramebufferTex< RenderTree >

Render manager helper for automatic framebuffer content textures.

When some shader used in a render tree context uses a framebuffer content texture (SV name tex framebuffer color or tex framebuffer depth) the contents of the framebuffer before the mesh using the shader is rendered are copied to the textures.

Usage: Functor for TraverseUsedSVSets. Application must happen after shader and ticket setup (e.g. SetupStandardTicket()). Example:

 // Define type using rendermanager-dependent render tree and context setup
 typedef CS::RenderManager::AutoFX::FramebufferTex<RenderTreeType, 
   ContextSetupType> AutoFramebufferTexType;

 // Instantiate helper in rendering
 RenderManagerType::AutoFramebufferTexType fxFB (
   rmanager->framebufferTexPersistent);
 // Set up a traverser for the sets of shader vars used over each mesh
 typedef TraverseUsedSVSets<RenderTreeType,
   RenderManagerType::AutoFramebufferTexType> SVTraverseType;
 SVTraverseType svTraverser
   (fxFB, shaderManager->GetSVNameStringset ()->GetSize (), fxFB.svUserFlags);
 // Do the actual traversal.
 ForEachMeshNode (context, svTraverser);

The template parameter RenderTree gives the render tree type.

Definition at line 131 of file autofx_framebuffertex.h.


Member Function Documentation

template<typename RenderTree >
void CS::RenderManager::AutoFX::FramebufferTex< RenderTree >::operator() ( typename RenderTree::MeshNode node,
size_t  layer,
typename RenderTree::MeshNode::SingleMesh mesh,
const csBitArray names 
) [inline]

Operator doing the actual work.

If one of the reflection or refraction textures is detected in the set of shader vars used (names) by mesh textures are set up.

Definition at line 143 of file autofx_framebuffertex.h.


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

Generated for Crystal Space 2.0 by doxygen 1.6.1