]> git.tdb.fi Git - libs/gl.git/commitdiff
Adjust the desert pillars demo to recent changes
authorMikko Rasa <tdb@tdb.fi>
Sat, 27 Sep 2014 15:43:02 +0000 (18:43 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 27 Sep 2014 15:43:02 +0000 (18:43 +0300)
Also decrease the cube's shininess from 150 to 120 for compatibility with
older OpenGL versions.

demos/desertpillars.cpp

index c0ba0c6cec34617242800392a3af6e960be2fe36..b5cdde063b7b62b674177f71694abe0a3b52a73b 100644 (file)
@@ -746,7 +746,8 @@ void DesertPillars::create_cube()
        cube_material.set_diffuse(GL::Color(0.5, 0.5, 0.55));
        cube_material.set_ambient(GL::Color(0.5, 0.5, 0.55));
        cube_material.set_specular(GL::Color(1.0));
-       cube_material.set_shininess(150);
+       cube_material.set_shininess(120);
+       cube_material.set_reflectivity(0.5);
 
        // First create a simplified shader for rendering the shadow map
        GL::ProgramBuilder::StandardFeatures features;
@@ -919,9 +920,7 @@ DesertPillars::ObjectData::~ObjectData()
 
 DesertPillars::Cube::Cube(const GL::Object &obj):
        GL::AnimatedObject(obj)
-{
-       shdata.uniform("reflectivity", 0.5f);
-}
+{ }
 
 void DesertPillars::Cube::set_spherify(float s)
 {