|
0 A.D. | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Class ShadowMap: Maintain the shadow map texture and perform necessary OpenGL setup, including matrix calculations. The class will automatically generate a texture the first time the shadow map is rendered into. The texture will not be resized afterwards. Can use a simple luminance map to store shadows (no self-shadowing possible) or depth textures (with self-shadowing). Default is to use a luminance map, use SetUseDepthTexture to override the default.
Field Summary | |
private ShadowMapInternals* |
m
|
Constructor Summary | |
ShadowMap()
|
|
~ShadowMap()
Force the texture/buffer/etc to be recreated, particularly when the renderer's size has changed |
Method Summary | |
void |
AddShadowedBound( const CBound& bounds )
CalcShadowMatrices: calculate required matrices for shadow map generation - the light's projection and transformation matrices |
void |
BeginRender()
Finish rendering into shadow map texture |
void |
EndRender()
Retrieve the texture handle and texture matrix for shadowing |
int |
GetDepthTextureBits() const
GetDepthTextureBits: Return the number of bits to use for depth textures when enabled. |
GLuint |
GetTexture() const
GetTexture: Retrieve the OpenGL texture object name that contains the shadow map. |
const CMatrix3D& |
GetTextureMatrix() const
Using depth textures vs. |
bool |
GetUseDepthTexture() const
GetUseDepthTexture: Return whether rendering uses a depth texture (instead of a luminance texture). |
void |
RecreateTexture()
SetupFrame: camera and light direction for this frame |
void |
RenderDebugDisplay()
RenderDebugDisplay: Visualize shadow mapping calculations to help in debugging and optimal shadow map usage. |
void |
SetDepthTextureBits( int bits )
RenderDebugDisplay: debug visualizations - blue: objects in shadow |
void |
SetupFrame( const CCamera& camera, const CVector3D& lightdir )
AddShadowedBound: add a world-space bounding box to the bounds of shadowed objects |
void |
SetUseDepthTexture( bool depthTexture )
Depth texture bits |
Field Detail |
private ShadowMapInternals* m;
Constructor Detail |
public ShadowMap();
public ~ShadowMap();
Method Detail |
public void AddShadowedBound( const CBound& bounds );
public void BeginRender();
public void EndRender();
public int GetDepthTextureBits() const;
public GLuint GetTexture() const;
public const CMatrix3D& GetTextureMatrix() const;
public bool GetUseDepthTexture() const;
public void RecreateTexture();
public void RenderDebugDisplay();
public void SetDepthTextureBits( int bits );
public void SetupFrame( const CCamera& camera, const CVector3D& lightdir );
public void SetUseDepthTexture( bool depthTexture );
|
0 A.D.
Generated on September 04, 2007 at 18:14 CppDoc v2.4.0 |
|||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |