version 3.3

VRS::DepthmapShadowTechniqueGL Class Reference

#include <vrs/opengl/depthmapshadowtechniquegl.h>

Inheritance diagram for VRS::DepthmapShadowTechniqueGL:

VRS::ShadowTechniqueTemplateGL VRS::TechniqueGL VRS::Technique VRS::RenderObj VRS::SharedObj VRS::Visitable VRS::AlphaTextureShadowTechniqueGL VRS::DepthTextureShadowTechniqueGL

List of all members.

Public Member Functions

 DepthmapShadowTechniqueGL (int resolution)
void setDepthmapResolution (int)
int getDepthmapResolution () const
 Gets the resolution of the depth texture.
 VRS_TYPEINFO (DepthmapShadowTechniqueGL, ShadowTechniqueTemplateGL)
 VRS_SERIALIZABLE_ABSTRACT_CLASS (DepthmapShadowTechniqueGL)

Static Public Member Functions

static int getViewFromLight (const Light *, Engine *, const Bounds &, Matrix &proj, Matrix &view)
static double getAngleOfPerspectiveFrustum (const Vector &, const Bounds &)

Protected Member Functions

virtual bool addNextBuildDepthMapPass (Iterator< SO< Light > > *lightItr, Engine *engine)
void createPBuffer (Engine *)
void freePBuffer (Engine *)
PBufferCanvasGLPBuffer ()
void preparePBuffer (Engine *)
void releasePBuffer (Engine *)

Protected Attributes

SO< CachedResource< SO< Light >
, DepthMapInfo > > 
depthMapDict_

Classes

struct  DepthMapInfo


Constructor & Destructor Documentation

VRS::DepthmapShadowTechniqueGL::DepthmapShadowTechniqueGL ( int  resolution  ) 

Abstract base class for shadow map based shadow techniques. Main purpose is to factorize common code from concrete shadow map techniques.


Member Function Documentation

void VRS::DepthmapShadowTechniqueGL::setDepthmapResolution ( int   ) 

Sets the resolution of the depthmap. Higher values yield much improved quality, however performance drops because of fillrate limitations, and (more importantly) framebuffer ressources are eaten up (resolution*resolution*4*(shadows) bytes for the PBuffer).

int VRS::DepthmapShadowTechniqueGL::getDepthmapResolution (  )  const [inline]

Gets the resolution of the depth texture.

VRS::DepthmapShadowTechniqueGL::VRS_TYPEINFO ( DepthmapShadowTechniqueGL  ,
ShadowTechniqueTemplateGL   
)

VRS::DepthmapShadowTechniqueGL::VRS_SERIALIZABLE_ABSTRACT_CLASS ( DepthmapShadowTechniqueGL   ) 

virtual bool VRS::DepthmapShadowTechniqueGL::addNextBuildDepthMapPass ( Iterator< SO< Light > > *  lightItr,
Engine engine 
) [protected, virtual]

void VRS::DepthmapShadowTechniqueGL::createPBuffer ( Engine  )  [protected]

created a PBuffer, sharing its context with that of the main canvas. The resolution of the PBuffer is determined by the resolution of the depth map.

void VRS::DepthmapShadowTechniqueGL::freePBuffer ( Engine  )  [protected]

PBufferCanvasGL * VRS::DepthmapShadowTechniqueGL::PBuffer (  )  [inline, protected]

returns the PBuffer.

void VRS::DepthmapShadowTechniqueGL::preparePBuffer ( Engine  )  [protected]

Provides a safe way to activate rendering to the PBuffer. Switches the current context, sets the proper viewport attribute, and disregards further Viewport and ImmediateCamera-Attributes.

void VRS::DepthmapShadowTechniqueGL::releasePBuffer ( Engine  )  [protected]

deactivate rendering to the PBuffer. Undoes changes of preparePBuffer

static int VRS::DepthmapShadowTechniqueGL::getViewFromLight ( const Light ,
Engine ,
const Bounds ,
Matrix proj,
Matrix view 
) [static]

Given light source and bounding box of shadow-casting shapes, calculates a frustum with camera at the light source position that contains the bounding box.

static double VRS::DepthmapShadowTechniqueGL::getAngleOfPerspectiveFrustum ( const Vector ,
const Bounds  
) [static]

Helper method of getViewFromLight


Member Data Documentation


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