version 3.3

VRS::AlphaTextureShadowTechniqueGL Class Reference

#include <vrs/opengl/depthmapshadowtechniquegl.h>

Inheritance diagram for VRS::AlphaTextureShadowTechniqueGL:

VRS::DepthmapShadowTechniqueGL VRS::ShadowTechniqueTemplateGL VRS::TechniqueGL VRS::Technique VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 AlphaTextureShadowTechniqueGL (int alphaMapResolution=512)
virtual bool isSupported (Engine *, bool verbose) const
virtual int rate (Engine *) const
 VRS_TYPEINFO (AlphaTextureShadowTechniqueGL, ShadowTechniqueTemplateGL)
 VRS_SERIALIZABLE (AlphaTextureShadowTechniqueGL)

Protected Member Functions

virtual void startHook (Engine *)
 called by start()
virtual void stopHook (Engine *)
 called by stop()
virtual bool preparePassHook (Engine *)
virtual void finishPassHook (Engine *)
 called by finishPass()
virtual void nextPassHook (Engine *)
 called by nextPass()
virtual bool prepareEvalHook (Engine *engine, const Shape *shape)
virtual void finishEvalHook (Engine *engine, const Shape *shape, bool render)
virtual void setupShadowTest (bool onOff, Engine *)
virtual void toggleShadowTest (bool receiving, Engine *)


Constructor & Destructor Documentation

VRS::AlphaTextureShadowTechniqueGL::AlphaTextureShadowTechniqueGL ( int  alphaMapResolution = 512  ) 

The AlphaTextureShadowTechniqueGL renders on shapes with active Shadowed attribute a shadow, caused by shapes with active Shadowcasting attribute and the corresponding light source contained in those attributes.

The technique is registered in the ShadowTechniqueGL factory, so normally it is not necessary to use the technique directly. The technique also works directly in the scene graph, though.

Pointlights are not well supported by this Technique. Spotlights could be supported better, but in the moment they are not. So use Distantlights for your shadows right now.

The main idea for this technique is described in the PhD thesis of Wolfgang Heidrich, available at http://www.cs.ubc.ca/~heidrich/Papers/phd.pdf


Member Function Documentation

virtual bool VRS::AlphaTextureShadowTechniqueGL::isSupported ( Engine ,
bool  verbose 
) const [virtual]

Requires multitexturing, the GL_EXT_texture_env_combine-extension, a stencil buffer and a PBuffer. For the latter on NVidia Cards, use recent drivers. I am not sure of results with other graphic cards.

Implements VRS::ShadowTechniqueTemplateGL.

virtual int VRS::AlphaTextureShadowTechniqueGL::rate ( Engine  )  const [virtual]

For rating this technique in the ShadowTechniqueGL factory. Rating is 100, so less than the DepthTextureShadowTechniqueGL. In doubt this latter technique is chosen.

Implements VRS::ShadowTechniqueTemplateGL.

VRS::AlphaTextureShadowTechniqueGL::VRS_TYPEINFO ( AlphaTextureShadowTechniqueGL  ,
ShadowTechniqueTemplateGL   
)

VRS::AlphaTextureShadowTechniqueGL::VRS_SERIALIZABLE ( AlphaTextureShadowTechniqueGL   ) 

virtual void VRS::AlphaTextureShadowTechniqueGL::startHook ( Engine  )  [protected, virtual]

called by start()

Implements VRS::ShadowTechniqueTemplateGL.

virtual void VRS::AlphaTextureShadowTechniqueGL::stopHook ( Engine  )  [protected, virtual]

called by stop()

Implements VRS::ShadowTechniqueTemplateGL.

virtual bool VRS::AlphaTextureShadowTechniqueGL::preparePassHook ( Engine  )  [protected, virtual]

called by preparePass(). If the result is true, the pass will be evaluated in any case. If the result is false, it is up to the ShadowTechniqueTemplateGL base technique whether the pass is evaluated or not. (see preparePass() )

Implements VRS::ShadowTechniqueTemplateGL.

virtual void VRS::AlphaTextureShadowTechniqueGL::finishPassHook ( Engine  )  [protected, virtual]

virtual void VRS::AlphaTextureShadowTechniqueGL::nextPassHook ( Engine  )  [protected, virtual]

virtual bool VRS::AlphaTextureShadowTechniqueGL::prepareEvalHook ( Engine ,
const Shape  
) [protected, virtual]

called by prepareEval(). If the result is false, the shape will not be rendered in any case. If the result is true, it is up to the ShadowTechniqueTemplateGL base technique whether the shape is rendered or not (see prepareEval() )

Implements VRS::ShadowTechniqueTemplateGL.

virtual void VRS::AlphaTextureShadowTechniqueGL::finishEvalHook ( Engine ,
const Shape ,
bool  render 
) [protected, virtual]

called by finishEval(). render contains the information whether the shape has been rendered or not.

Implements VRS::ShadowTechniqueTemplateGL.

virtual void VRS::AlphaTextureShadowTechniqueGL::setupShadowTest ( bool  onOff,
Engine  
) [protected, virtual]

For SIMPLESHADOWADDLIGHT pass, if onOff is true, sets up opengl stenciling and/or blending function in a way that only fragments in light are rendered. If onOff is false, the settings are undone.

Implements VRS::ShadowTechniqueTemplateGL.

virtual void VRS::AlphaTextureShadowTechniqueGL::toggleShadowTest ( bool  receiving,
Engine  
) [protected, virtual]

For SIMPLESHADOWADDLIGHT pass, enables resp. disables the fragment check for shadowed regions.

Implements VRS::ShadowTechniqueTemplateGL.


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

Generated on Fri May 24 06:00:25 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact