First blood
This commit is contained in:
1 parent
04f270f322
commit
5720f8322b
250 files changed
+33215
No files matched your search
@@ -0,0 +1,53 @@
|
||||
#include "include/LightManager/LightManager.h"
|
||||
|
||||
#include "include/Utils/Utils.h"
|
||||
#include "include/Engine.h"
|
||||
|
||||
|
||||
namespace SE
|
||||
{
|
||||
|
||||
//===================================================
|
||||
//================ LIGHT MANAGER ====================
|
||||
//===================================================
|
||||
|
||||
TLightManager::TLightManager()
|
||||
: LightingEnabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
void TLightManager::SetLightPos(vec3 pos)
|
||||
{
|
||||
LightPos = pos;
|
||||
}
|
||||
|
||||
void TLightManager::SetLightDirection(vec3 dir)
|
||||
{
|
||||
LightDirection = Normalize(dir);
|
||||
}
|
||||
|
||||
void TLightManager::SetLightColor(vec4 color)
|
||||
{
|
||||
LightColor = color;
|
||||
}
|
||||
|
||||
|
||||
void TLightManager::SetLightOn()
|
||||
{
|
||||
LightingEnabled = true;
|
||||
}
|
||||
|
||||
void TLightManager::SetLightOff()
|
||||
{
|
||||
LightingEnabled = false;
|
||||
}
|
||||
|
||||
void TLightManager::SetLightUniforms()
|
||||
{
|
||||
|
||||
RenderUniform3fv(CONST_STRING_LIGHT_POS_UNIFORM, LightPos.v);
|
||||
RenderUniform3fv(CONST_STRING_LIGHT_DIRECTION_UNIFORM, LightDirection.v);
|
||||
RenderUniform4fv(CONST_STRING_LIGHT_COLOR_UNIFORM, LightColor.v);
|
||||
}
|
||||
|
||||
} //namespace SE
|
||||
Reference in new issue
Block a user