CSEngine
|
#include <LightMgr.h>
Public Member Functions | |
LightMgr () | |
~LightMgr () override | |
void | AttachLightToShader (const GLProgramHandle *handle) const |
void | AttachLightMapToShader (const GLProgramHandle *handle, int textureLayout) const |
void | Init () override |
int | GetShadowCount () const |
int | GetLightMapCount () const |
void | RefreshShadowCount (int shadowCount=-1) const |
![]() | |
void | Register (LightComponent *object) override |
void | Remove (LightComponent *object) override |
LightComponent * | Get (int index) const override |
std::list< LightComponent * > | GetAll () const override |
int | GetID (LightComponent *object) const override |
int | GetSize () const override |
![]() | |
![]() | |
virtual void | Update (float elapsedTime) |
Public Attributes | |
const int | SHADOW_WIDTH = 1024 |
Width of the shadow map. | |
const int | SHADOW_HEIGHT = 1024 |
Height of the shadow map. | |
Static Public Attributes | |
static constexpr float | SHADOW_DISTANCE = 10.f |
Distance of the shadow map. | |
Additional Inherited Members | |
![]() | |
std::list< LightComponent * > | m_objects |
int | m_size |
LightMgr class is a manager of Light components. This class also manages ShadowMap for giving shadow effects to objects in the scene.
Definition at line 17 of file LightMgr.h.
|
explicitdefault |
Constructor of LightMgr.
|
override |
Destructor of LightMgr.
Definition at line 10 of file LightMgr.cpp.
void LightMgr::AttachLightMapToShader | ( | const GLProgramHandle * | handle, |
int | textureLayout ) const |
Attach the light map to the shader.
handle | Shader handle |
textureLayout | Layout of the texture |
Definition at line 47 of file LightMgr.cpp.
Referenced by CSE::DeferredRenderGroup::RenderGbuffer().
void LightMgr::AttachLightToShader | ( | const GLProgramHandle * | handle | ) | const |
Attach the light components to the shader.
handle | Shader handle |
Definition at line 15 of file LightMgr.cpp.
Referenced by CSE::ForwardRenderGroup::RenderAll(), and CSE::DeferredRenderGroup::RenderGbuffer().
|
inline |
Get the light map count.
Definition at line 64 of file LightMgr.h.
Referenced by CSE::ForwardRenderGroup::RenderAll(), and CSE::DeferredRenderGroup::RenderGbuffer().
|
inline |
Get the shadow count.
Definition at line 56 of file LightMgr.h.
Referenced by CSE::ForwardRenderGroup::RenderAll(), and CSE::DeferredRenderGroup::RenderGbuffer().
|
overridevirtual |
Initialize the LightMgr.
Implements CSE::CoreBase.
Definition at line 51 of file LightMgr.cpp.
void LightMgr::RefreshShadowCount | ( | int | shadowCount = -1 | ) | const |
Refresh the shadow count.
shadowCount | Shadow count to refresh. Default is -1. |
Definition at line 57 of file LightMgr.cpp.
|
staticconstexpr |
Distance of the shadow map.
Definition at line 21 of file LightMgr.h.
Referenced by CSE::DepthOnlyRenderGroup::RenderAll().
const int CSE::LightMgr::SHADOW_HEIGHT = 1024 |
Height of the shadow map.
Definition at line 20 of file LightMgr.h.
const int CSE::LightMgr::SHADOW_WIDTH = 1024 |
Width of the shadow map.
Definition at line 19 of file LightMgr.h.