- if(ARB_direct_state_access)
- glBlitNamedFramebuffer(state->framebuffer->get_id(), target.get_id(), 0, 0, width, height, 0, 0, width, height, buffers, GL_NEAREST);
- else
- {
- glBindFramebuffer(GL_READ_FRAMEBUFFER, state->framebuffer->get_id());
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, target.get_id());
-
- target.refresh();
+ pipeline_state.set_framebuffer(state->framebuffer);
+ commands.use_pipeline(&pipeline_state);
+ commands.resolve_multisample(target);
+}