| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/opengl/depthmapshadowtechniquegl.h>

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 *) |
| PBufferCanvasGL * | PBuffer () |
| void | preparePBuffer (Engine *) |
| void | releasePBuffer (Engine *) |
Protected Attributes | |
| SO< CachedResource< SO< Light > , DepthMapInfo > > | depthMapDict_ |
Classes | |
| struct | DepthMapInfo |
| 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.
| 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
SO<CachedResource<SO<Light>, DepthMapInfo> > VRS::DepthmapShadowTechniqueGL::depthMapDict_ [protected] |