22 #ifndef INCLUDED_SHADOWMAP
23 #define INCLUDED_SHADOWMAP
144 #endif // INCLUDED_SHADOWMAP
void SetDepthTextureBits(int bits)
SetDepthTextureBits: Sets the number of bits to use for depth textures when enabled.
int GetDepthTextureBits() const
GetDepthTextureBits: Return the number of bits to use for depth textures when enabled.
void SetupFrame(const CCamera &camera, const CVector3D &lightdir)
SetupFrame: Configure light space for the given camera and light direction, create the shadow texture...
void AddShadowedBound(const CBoundingBoxAligned &bounds)
AddShadowedBound: Add the bounding box of an object that has to be shadowed.
Struct ShadowMapInternals: Internal data for the ShadowMap implementation.
GLuint GetTexture() const
GetTexture: Retrieve the OpenGL texture object name that contains the shadow map. ...
Class ShadowMap: Maintain the shadow map texture and perform necessary OpenGL setup, including matrix calculations.
int GetWidth() const
GetWidth: Return the width of the depth texture.
void RenderDebugTexture()
Visualize shadow map texture to help in debugging.
T bits(T num, size_t lo_idx, size_t hi_idx)
extract the value of bits hi_idx:lo_idx within num
void BeginRender()
BeginRender: Set OpenGL state for rendering into the shadow map texture.
const CMatrix3D & GetTextureMatrix() const
GetTextureMatrix: Retrieve the world-space to shadow map texture coordinates transformation matrix...
void RenderDebugBounds()
Visualize shadow mapping calculations to help in debugging and optimal shadow map usage...
void RecreateTexture()
RecreateTexture: Destroy the current shadow texture and force creation of a new one.
void EndRender()
EndRender: Finish rendering into the shadow map.
int GetHeight() const
GetHeight: Return the height of the depth texture.