2 #include "renderable.h"
9 View::View(Framebuffer &t):
15 void View::set_camera(Camera *c)
19 camera->set_aspect_ratio(get_aspect_ratio());
22 void View::set_content(Renderable *r)
27 void View::synchronize_camera_aspect(Camera &c)
29 synced_cameras.push_back(&c);
30 c.set_aspect_ratio(get_aspect_ratio());
35 Bind bind_fbo(target);
36 target.clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT);
39 Renderer renderer(camera);
40 content->setup_frame(renderer);
41 content->render(renderer);
42 content->finish_frame();