From: Mikko Rasa Date: Fri, 29 Nov 2013 09:50:42 +0000 (+0200) Subject: Use renderer for lighting in the shaders demo X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d889a4dabc2a8d3b4ed9e8d45f86edf40ba2e69a;p=libs%2Fgl.git Use renderer for lighting in the shaders demo --- diff --git a/demos/shaders.cpp b/demos/shaders.cpp index 872c3c16..5a268fec 100644 --- a/demos/shaders.cpp +++ b/demos/shaders.cpp @@ -82,11 +82,9 @@ int main() GL::Lighting lighting; GL::Light light; - light.set_position(GL::Vector4(0, 2, 3, 0)); + light.set_position(GL::Vector4(0, -0.781, 0.625, 0)); lighting.attach(0, light); - GL::Bind bind_light(lighting); - GL::Texturing texturing; texturing.attach(0, tex1); texturing.attach(1, tex2); @@ -105,6 +103,7 @@ int main() { GL::Bind bind_depth(GL::DepthTest::lequal()); GL::Renderer renderer(0); + renderer.set_lighting(&lighting); renderer.set_material(&mat); renderer.set_texturing(&texturing); renderer.add_shader_data(progdata);