From d889a4dabc2a8d3b4ed9e8d45f86edf40ba2e69a Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 29 Nov 2013 11:50:42 +0200 Subject: [PATCH] Use renderer for lighting in the shaders demo --- demos/shaders.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); -- 2.45.2