|
CSEngine
|
#include <LightMgr.h>
Public Member Functions | |
| LightMgr () | |
| ~LightMgr () override | |
| int | AttachLightToShader (const GLProgramHandle *handle) const |
| int | 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< std::list< LightComponent * >, LightComponent *, int > | |
Public Member Functions inherited from CSE::CoreBase | |
| virtual void | Update (float elapsedTime) |
Static Public Member Functions | |
| static void | ExterminateGlobalSettings () |
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 = 100.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.
| int 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::ForwardRenderGroup::RenderAll(), and CSE::DeferredRenderGroup::RenderGbuffer().
| int 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().
|
static |
Definition at line 73 of file LightMgr.cpp.
|
inline |
Get the light map count.
Definition at line 64 of file LightMgr.h.
|
inline |
Get the shadow count.
Definition at line 56 of file LightMgr.h.
|
overridevirtual |
Initialize the LightMgr.
Implements CSE::CoreBase.
Definition at line 53 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 61 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.