]> git.tdb.fi Git - libs/gl.git/commitdiff
Refresh target framebuffer before blitting
authorMikko Rasa <tdb@tdb.fi>
Thu, 7 Apr 2022 20:50:31 +0000 (23:50 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 7 Apr 2022 20:50:31 +0000 (23:50 +0300)
It seems that this has been broken since ce36589 without getting noticed.

source/backends/opengl/commands_backend.cpp

index 1ec19c13d63b7e908a2f90ddbcdbada8bcfd4363..7d599153e74e10ecec77bd603af376783b021286 100644 (file)
@@ -91,7 +91,10 @@ void OpenGLCommands::resolve_multisample(Framebuffer &target)
        unsigned buffers = get_gl_buffer_bits(source->get_format())&get_gl_buffer_bits(target.get_format());
 
        if(ARB_direct_state_access)
+       {
+               target.refresh();
                glBlitNamedFramebuffer(source->id, target.id, 0, 0, width, height, 0, 0, width, height, buffers, GL_NEAREST);
+       }
        else
        {
                glBindFramebuffer(GL_READ_FRAMEBUFFER, source->id);