Added ambient lighting

This commit is contained in:
Robert 2021-01-25 20:53:28 +01:00
parent dea312a704
commit 482205b96e
9 changed files with 69 additions and 9 deletions

View file

@ -13,7 +13,7 @@ namespace oglu
const Color Color::Transparent(0.f, 0.f, 0.f, 0.f);
Color::Color() :
r(0.f), g(0.f), b(0.f), a(0.f)
r(0.f), g(0.f), b(0.f), a(1.f)
{
}

24
src/lighting/ambient.cpp Normal file
View file

@ -0,0 +1,24 @@
#include "lighting/ambient.hpp"
namespace oglu
{
AmbientLight::AmbientLight() :
color(1.f, 1.f, 1.f), intensity(1.0f)
{
}
AmbientLight::AmbientLight(GLfloat r, GLfloat g, GLfloat b, GLfloat intensity) :
color(r, g, b), intensity(intensity)
{
}
AmbientLight::AmbientLight(const Color& color, GLfloat intensity) :
color(color), intensity(intensity)
{
}
AmbientLight::AmbientLight(const AmbientLight& other) :
color(other.color), intensity(other.intensity)
{
}
}