Added attenuation

This commit is contained in:
Robert 2021-01-29 19:42:36 +01:00
parent f2d1975af3
commit 6981510aaf
11 changed files with 43 additions and 29 deletions

View file

@ -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

View file

@ -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));
}