From: Mikko Rasa Date: Sat, 16 Aug 2014 09:53:37 +0000 (+0300) Subject: Use a renderer in the viewer X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=ecb3b9fafd1b225d436d23341d346a94df1fa282;p=libs%2Fgl.git Use a renderer in the viewer Some renderables using more sophisticated features won't even render properly without one. --- diff --git a/tools/viewer.cpp b/tools/viewer.cpp index 2582b887..3e12321f 100644 --- a/tools/viewer.cpp +++ b/tools/viewer.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -217,12 +218,11 @@ void Viewer::tick() GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT); - camera.apply(); - - GL::Bind bind_lighting(lighting); GL::Bind bind_depth(GL::DepthTest::lequal()); GL::Bind bind_blend(GL::Blend::alpha()); - renderable->render(); + GL::Renderer renderer(&camera); + renderer.set_lighting(&lighting); + renderable->render(renderer); window.swap_buffers(); }