Added ambient lighting
This commit is contained in:
parent
dea312a704
commit
482205b96e
9 changed files with 69 additions and 9 deletions
|
@ -33,7 +33,7 @@ namespace oglu
|
|||
* @param green Green component
|
||||
* @param alpha Red component
|
||||
*/
|
||||
Color(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha = 255);
|
||||
Color(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha = 0.f);
|
||||
|
||||
public:
|
||||
GLfloat r; ///< Red channel
|
||||
|
|
22
include/lighting/ambient.hpp
Normal file
22
include/lighting/ambient.hpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef AMBIENT_HPP
|
||||
#define AMBIENT_HPP
|
||||
|
||||
#include <core.hpp>
|
||||
#include <color.hpp>
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
class OGLU_API AmbientLight
|
||||
{
|
||||
public:
|
||||
AmbientLight();
|
||||
AmbientLight(GLfloat r, GLfloat g, GLfloat b, GLfloat intensity);
|
||||
AmbientLight(const Color& color, GLfloat intensity);
|
||||
AmbientLight(const AmbientLight& other);
|
||||
|
||||
GLfloat intensity;
|
||||
Color color;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -15,6 +15,8 @@
|
|||
#include <object.hpp>
|
||||
#include <camera.hpp>
|
||||
|
||||
#include <lighting/ambient.hpp>
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue