AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Aire::DirectionalShadows Class Reference

Class to handle directional light shadows using shadow mapping with a depth map. More...

#include <shadows.h>

Public Member Functions

 DirectionalShadows (const GLuint shaderProg, Light light, GLuint width=4096, GLuint height=4096)
 Constructor for DirectionalShadows.
 
 ~DirectionalShadows ()
 Destructor for DirectionalShadows.
 

Public Attributes

GLuint FBO
 
const GLuint width
 
const GLuint height
 
GLuint shaderProg
 
GLuint depthMap
 
glm::mat4 lightSpaceMatrix
 

Detailed Description

Class to handle directional light shadows using shadow mapping with a depth map.

Constructor & Destructor Documentation

◆ DirectionalShadows()

DirectionalShadows::DirectionalShadows ( const GLuint shaderProg,
Light light,
GLuint width = 4096,
GLuint height = 4096 )

Constructor for DirectionalShadows.

Parameters
shaderProgThe shader program used for rendering.
lightThe directional light for which shadows are generated.
widthThe width of the shadow map texture.
heightThe height of the shadow map texture.

Member Data Documentation

◆ depthMap

GLuint Aire::DirectionalShadows::depthMap

Depth map texture for shadow mapping.

◆ FBO

GLuint Aire::DirectionalShadows::FBO

Framebuffer object for rendering to the depth map.

◆ height

const GLuint Aire::DirectionalShadows::height

Dimensions of the shadow map texture.

◆ lightSpaceMatrix

glm::mat4 Aire::DirectionalShadows::lightSpaceMatrix

Light space matrix for transforming coordinates.

◆ shaderProg

GLuint Aire::DirectionalShadows::shaderProg

Shader program used for rendering.


The documentation for this class was generated from the following files: