]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/framebuffer.cpp
Restructure system framebuffer and make WindowView own it
[libs/gl.git] / source / core / framebuffer.cpp
index 01fd626598c676a7417f2772f8d72c3b4ae5b700..70c19859d128aeda40f1f9a1b34cb7cfd4774e06 100644 (file)
@@ -18,13 +18,7 @@ framebuffer_incomplete::framebuffer_incomplete(const std::string &reason):
 Framebuffer::Framebuffer(bool s):
        FramebufferBackend(s),
        dirty(0)
-{
-       if(s)
-       {
-               format = get_system_format();
-               get_system_size(width, height);
-       }
-}
+{ }
 
 Framebuffer::Framebuffer():
        FramebufferBackend(false),
@@ -175,15 +169,6 @@ void Framebuffer::detach(FrameAttachment attch)
        }
 }
 
-void Framebuffer::resize(const WindowView &view)
-{
-       if(attachments.empty())
-               throw invalid_operation("Framebuffer::resize");
-
-       width = view.get_width();
-       height = view.get_height();
-}
-
 void Framebuffer::require_complete() const
 {
        bool layered = (!attachments.empty() && attachments.front().layer<0);
@@ -198,12 +183,6 @@ void Framebuffer::require_complete() const
        FramebufferBackend::require_complete();
 }
 
-Framebuffer &Framebuffer::system()
-{
-       static Framebuffer sys_framebuf(true);
-       return sys_framebuf;
-}
-
 
 void Framebuffer::Attachment::set(Texture &t, unsigned l, int z)
 {