version 3.3

VRS::DepthTextureShadowTechniqueGL Class Reference

#include <vrs/opengl/depthmapshadowtechniquegl.h>

Inheritance diagram for VRS::DepthTextureShadowTechniqueGL:

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

List of all members.

Public Member Functions

 DepthTextureShadowTechniqueGL (int depthTextureResolution=512, double roffset=0.01)
virtual bool isSupported (Engine *, bool verbose) const
virtual int rate (Engine *) const
 VRS_TYPEINFO (DepthTextureShadowTechniqueGL, ShadowTechniqueTemplateGL)
 VRS_SERIALIZABLE (DepthTextureShadowTechniqueGL)

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::DepthTextureShadowTechniqueGL::DepthTextureShadowTechniqueGL ( int  depthTextureResolution = 512,
double  roffset = 0.01 
)

The DepthTextureShadowTechniqueGL 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.


Member Function Documentation

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

Requires GL_ARB_depth_texture and GL_ARB_shadow extensions.

  • A prior rendering path using GL_SGIX_depth_shadow, GL_SGIX_shadow and GL_NV_register_combiners has been removed in july 2003. Update your drivers
  • a PBuffer in any case
  • stencil buffer of dest alpha buffer.

Implements VRS::ShadowTechniqueTemplateGL.

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

For rating this technique in the ShadowTechniqueGL factory. Rating is 200 when use with the alpha buffer (edges are antialiased then), and 120 when marking shadows in the stencil buffer (the technique then still is preferable over AlphaTextureShadowTechniqueGL, since only one texture is needed). So if possible, this technique is chosen for rendering shadows in VRS.

Implements VRS::ShadowTechniqueTemplateGL.

VRS::DepthTextureShadowTechniqueGL::VRS_TYPEINFO ( DepthTextureShadowTechniqueGL  ,
ShadowTechniqueTemplateGL   
)

VRS::DepthTextureShadowTechniqueGL::VRS_SERIALIZABLE ( DepthTextureShadowTechniqueGL   ) 

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

called by start()

Implements VRS::ShadowTechniqueTemplateGL.

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

called by stop()

Implements VRS::ShadowTechniqueTemplateGL.

virtual bool VRS::DepthTextureShadowTechniqueGL::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::DepthTextureShadowTechniqueGL::finishPassHook ( Engine  )  [protected, virtual]

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

virtual bool VRS::DepthTextureShadowTechniqueGL::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::DepthTextureShadowTechniqueGL::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::DepthTextureShadowTechniqueGL::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::DepthTextureShadowTechniqueGL::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 Mon May 21 06:00:20 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact