[Optimization] (Diligent/Framebuffer): explicitly unbind framebuffer on texture copy (BlitFramebuffer)

This commit is contained in:
2025-07-08 14:32:25 +08:00
parent e3765f1f50
commit 9db24e6593
@@ -522,6 +522,9 @@ namespace MG_GL::GL {
// MG_Util::Debug::LogD("Current render pass ended."); // MG_Util::Debug::LogD("Current render pass ended.");
// } // }
// explicitly unbind the texture
MG_Diligent::g_pContext->SetRenderTargets(0, nullptr, nullptr, Diligent::RESOURCE_STATE_TRANSITION_MODE_NONE);
GLuint readFB = MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER]; GLuint readFB = MG_State_T::framebufferState->currentBindings_[GL_READ_FRAMEBUFFER];
GLuint drawFB = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER]; GLuint drawFB = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER];