Added attenuation
This commit is contained in:
parent
f2d1975af3
commit
6981510aaf
11 changed files with 43 additions and 29 deletions
|
@ -80,6 +80,9 @@ namespace oglu
|
|||
Color diffusionColor; ///< Diffusion color of the light
|
||||
Color specularColor; ///< Specular color of the light
|
||||
|
||||
float constant; ///< Constant value of the attenuation term
|
||||
float linear; ///< Coefficient of the linear attenuation term
|
||||
float quadratic; ///< Coefficient of the quadratic attenuation term
|
||||
|
||||
private:
|
||||
glm::vec3* position; ///< Position of the light
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace oglu
|
|||
* @param name The name of the property
|
||||
* @returns The value of the stored property
|
||||
*/
|
||||
template<typename T> inline T GetPropertyValue(const std::string& name, std::ostream& errorStream = OGLU_ERROR_STREAM)
|
||||
template<typename T> inline T& GetPropertyValue(const std::string& name, std::ostream& errorStream = OGLU_ERROR_STREAM)
|
||||
{
|
||||
return *(GetProperty<T>(name, errorStream));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue