namespace Msp {
namespace GL {
-View::View():
- target(Framebuffer::system()),
+View::View(Framebuffer &t):
+ target(t),
camera(0),
content(0)
{ }
void View::render()
{
+ Bind bind_fbo(target);
target.clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT);
if(content)
{
Renderable *content;
std::list<Camera *> synced_cameras;
- View();
+ View(Framebuffer &);
public:
virtual unsigned get_width() const { return target.get_width(); }
namespace GL {
WindowView::WindowView(Graphics::Window &w, Graphics::GLContext &c):
+ View(Framebuffer::system()),
window(w),
context(c)
{
Graphics::Window &get_window() { return window; }
Graphics::GLContext &get_context() { return context; }
- unsigned get_width() const { return window.get_width(); }
- unsigned get_height() const { return window.get_height(); }
+ virtual unsigned get_width() const { return window.get_width(); }
+ virtual unsigned get_height() const { return window.get_height(); }
virtual void render();