Some renderables using more sophisticated features won't even render
properly without one.
#include <msp/gl/lighting.h>
#include <msp/gl/mesh.h>
#include <msp/gl/object.h>
#include <msp/gl/lighting.h>
#include <msp/gl/mesh.h>
#include <msp/gl/object.h>
+#include <msp/gl/renderer.h>
#include <msp/gl/resources.h>
#include <msp/gl/technique.h>
#include <msp/gl/tests.h>
#include <msp/gl/resources.h>
#include <msp/gl/technique.h>
#include <msp/gl/tests.h>
GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT);
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());
GL::Bind bind_depth(GL::DepthTest::lequal());
GL::Bind bind_blend(GL::Blend::alpha());
+ GL::Renderer renderer(&camera);
+ renderer.set_lighting(&lighting);
+ renderable->render(renderer);