X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fframebuffer_backend.cpp;h=18566ac3c2553fd82ea1dd71ab735dc0f3cd3168;hp=de8a9c6eabd2274cceb83b7c087b570b06149d16;hb=3b98e13c823d4cb7e4d2d4d14e8440b44bc71f91;hpb=0d89e19481d4d5f770411141906f9df344c6b823 diff --git a/source/backends/opengl/framebuffer_backend.cpp b/source/backends/opengl/framebuffer_backend.cpp index de8a9c6e..18566ac3 100644 --- a/source/backends/opengl/framebuffer_backend.cpp +++ b/source/backends/opengl/framebuffer_backend.cpp @@ -76,23 +76,24 @@ void OpenGLFramebuffer::require_layered() void OpenGLFramebuffer::resize_system(unsigned w, unsigned h) { - Framebuffer *self = static_cast(this); - self->width = w; - self->height = h; + Framebuffer &self = *static_cast(this); + self.width = w; + self.height = h; } void OpenGLFramebuffer::update(unsigned mask) const { - const FrameFormat &format = static_cast(this)->format; + const Framebuffer &self = *static_cast(this); + vector color_bufs; - color_bufs.reserve(format.size()); + color_bufs.reserve(self.format.size()); unsigned i = 0; - for(FrameAttachment a: format) + for(FrameAttachment a: self.format) { GLenum gl_attach_point = get_gl_attachment(a); if(mask&(1<(this)->attachments[i]; + const Framebuffer::Attachment &attch = self.attachments[i]; if(attch.tex) { if(ARB_direct_state_access)