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 |
Public Member Functions inherited from CSE::SContainerList< LightComponent * > | |
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 |
Public Member Functions inherited from CSE::SIContainer< S, T, M > | |
virtual void | Register (T object)=0 |
virtual void | Remove (T object)=0 |
virtual T | Get (M index) const =0 |
virtual M | GetID (T object) const =0 |
Public Member Functions inherited from CSE::CoreBase | |
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 | |
Protected Attributes inherited from CSE::SContainerList< LightComponent * > | |
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.