PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
pk::AmbientLight Class Reference

Class for initializing and using OpenGL ambient lighting. More...

#include <AmbientLight.hpp>

Collaboration diagram for pk::AmbientLight:
Collaboration graph

Public Member Functions

 AmbientLight ()
 Default constructor - this is probably not the constructor you want to use - see below. More...
 
 AmbientLight (glm::vec4 color, GLfloat ambientIntensity)
 Construct an OpenGL light source from a glm::vec4 color and float value for ambient intensity. More...
 
 ~AmbientLight ()
 
void update (GLuint ambientIntensityLocation, GLuint ambientColorLocation)
 Use an OpenGL ambient light source. More...
 

Private Attributes

glm::vec4 m_color
 Color of the ambient lighting. More...
 
GLfloat m_ambientIntensity
 Intensity value for the ambient lighting. More...
 

Detailed Description

Class for initializing and using OpenGL ambient lighting.

Constructor & Destructor Documentation

◆ AmbientLight() [1/2]

pk::AmbientLight::AmbientLight ( )
inline

Default constructor - this is probably not the constructor you want to use - see below.

◆ AmbientLight() [2/2]

pk::AmbientLight::AmbientLight ( glm::vec4  color,
GLfloat  ambientIntensity 
)

Construct an OpenGL light source from a glm::vec4 color and float value for ambient intensity.

Parameters
glm::vec4color - the color of the ambient light.
GLfloatambientIntensity - the value determining the intensity of the ambient light.

◆ ~AmbientLight()

pk::AmbientLight::~AmbientLight ( )

Member Function Documentation

◆ update()

void pk::AmbientLight::update ( GLuint  ambientIntensityLocation,
GLuint  ambientColorLocation 
)

Use an OpenGL ambient light source.

Parameters
GLuintambientIntensityLocation - a value corresponding to a memory location for ambient intensity.
GLuintambientColorLocation - a value corresponding to a memory location for ambient color.

Member Data Documentation

◆ m_ambientIntensity

GLfloat pk::AmbientLight::m_ambientIntensity
private

Intensity value for the ambient lighting.

◆ m_color

glm::vec4 pk::AmbientLight::m_color
private

Color of the ambient lighting.


The documentation for this class was generated from the following file: