version 3.3

VRS::Shader Class Reference

#include <vrs/shader.h>

Inheritance diagram for VRS::Shader:

VRS::Handler VRS::RenderObj VRS::SharedObj VRS::Visitable VRS::GL2::EdgeEnhancementShader VRS::GL2::NormalmapShader VRS::TexturingEffectShaderGL

List of all members.

Public Member Functions

virtual bool canBeUsed (Engine *, const MonoAttribute *) const
virtual bool isApplicableForCurrentPass (Engine *, const MonoAttribute *) const
virtual void start (Engine *, const MonoAttribute *)
virtual void stop (Engine *, const MonoAttribute *)
virtual bool needsPass (Engine *, const MonoAttribute *, unsigned int pass) const
virtual void preparePass (Engine *, const MonoAttribute *, unsigned int pass)
virtual void finishPass (Engine *, const MonoAttribute *, unsigned int pass)
virtual void pausePass (Engine *, const MonoAttribute *)
virtual void continuePass (Engine *, const MonoAttribute *)
virtual void eval (Engine *, const MonoAttribute *, const Shape *, unsigned int pass)
virtual ID service () const
virtual ID target () const
 VRS_TYPEINFO (Shader, Handler)


Detailed Description

Encapsulate multipass shading and rendering of a subscenegraph. If a monoattribute is evaluated by a shader, then the shader processes the subsequent scenegraph multiple times. If scenegraph evaluation encounters another monoattribute that needs to be evaluated by a shader, the recent shader is paused until the new shader has finished processing. Therefore, only one shader is active at any time.

Member Function Documentation

virtual bool VRS::Shader::canBeUsed ( Engine ,
const MonoAttribute  
) const [virtual]

Checks whether the current processor allows shading, and availability of extensions required for processing.

Reimplemented in VRS::GL2::EdgeEnhancementShader, VRS::GL2::NormalmapShader, and VRS::TexturingEffectShaderGL.

virtual bool VRS::Shader::isApplicableForCurrentPass ( Engine ,
const MonoAttribute  
) const [virtual]

Checks whether the current rendering pass (as defined by techniques) requires or allows for local shader evaluation of the scene graph. The default shader applies for all rendering passes where shading occurs, i.e., where the rendering hint is not NO_SHADING_PASS. Subclasses will overwrite this method very likely.

Reimplemented in VRS::GL2::EdgeEnhancementShader, VRS::GL2::NormalmapShader, and VRS::TexturingEffectShaderGL.

virtual void VRS::Shader::start ( Engine ,
const MonoAttribute  
) [inline, virtual]

virtual void VRS::Shader::stop ( Engine ,
const MonoAttribute  
) [inline, virtual]

Initializes and finishes scenegraph processing.

Reimplemented in VRS::GL2::EdgeEnhancementShader, and VRS::GL2::NormalmapShader.

virtual bool VRS::Shader::needsPass ( Engine ,
const MonoAttribute ,
unsigned int  pass 
) const [virtual]

Returns `true' if the shader requires another pass.

Reimplemented in VRS::GL2::EdgeEnhancementShader, and VRS::GL2::NormalmapShader.

virtual void VRS::Shader::preparePass ( Engine ,
const MonoAttribute ,
unsigned int  pass 
) [inline, virtual]

virtual void VRS::Shader::finishPass ( Engine ,
const MonoAttribute ,
unsigned int  pass 
) [inline, virtual]

Initializes and finishes the specified pass. Configuration depends on the given pass.

Reimplemented in VRS::GL2::EdgeEnhancementShader, and VRS::GL2::NormalmapShader.

virtual void VRS::Shader::pausePass ( Engine ,
const MonoAttribute  
) [inline, virtual]

virtual void VRS::Shader::continuePass ( Engine ,
const MonoAttribute  
) [inline, virtual]

`pausePass' interrups evaluation of a subscenegraph. All settings that may interfer with other scenegraph evaluation strategies should be withdrawn. It is invoked prior a new shader starts evaluating. A shader will only be interrupted if it is in the initial pass (=0). `continuePass' restarts processing the current pass. It is invoked after the other shader has finished all its passes.

virtual void VRS::Shader::eval ( Engine ,
const MonoAttribute ,
const Shape ,
unsigned int  pass 
) [virtual]

May be specified in sub classes to configure evaluation of shapes. Settings concerning the evaluation of a (specific) shape should be made before processing and withdrawn after processing, respectively.

Reimplemented in VRS::GL2::EdgeEnhancementShader, VRS::GL2::NormalmapShader, and VRS::TexturingEffectShaderGL.

virtual ID VRS::Shader::service (  )  const [virtual]

The service name of this handler is "Shader".

Reimplemented from VRS::Handler.

virtual ID VRS::Shader::target (  )  const [virtual]

The target class of the monoattribute classes for which the shader provides a service. This method is not pure virtual in order to be able to instantiate a standard shader.

Implements VRS::Handler.

Reimplemented in VRS::GL2::EdgeEnhancementShader, VRS::GL2::NormalmapShader, and VRS::TexturingEffectShaderGL.

VRS::Shader::VRS_TYPEINFO ( Shader  ,
Handler   
)


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

Generated on Tue May 22 06:00:31 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact