From ee9a121c6f38f69519a39fb79a9f0d7c76b98136 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sat, 7 Mar 2026 09:31:42 +0800 Subject: [PATCH] [Fix] (MG_Impl/Init): bind default fbo to draw/read slot at init --- MobileGL/MG_Impl/Init.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MobileGL/MG_Impl/Init.cpp b/MobileGL/MG_Impl/Init.cpp index 52fcd87b..67dc042a 100644 --- a/MobileGL/MG_Impl/Init.cpp +++ b/MobileGL/MG_Impl/Init.cpp @@ -37,5 +37,7 @@ namespace MobileGL::MG_Impl { fbo0->AttachTexture(FramebufferAttachmentType::Stencil, stencilTex); GLImpl::FramebufferImpl::pDefaultFramebufferInfo = new GLImpl::FramebufferImpl::DefaultFramebufferInfo(fbo0, colorTex, depthTex, stencilTex); + MG_State::pGLContext->GetFramebufferBindingSlot(FramebufferTarget::Draw).Bind(fbo0); + MG_State::pGLContext->GetFramebufferBindingSlot(FramebufferTarget::Read).Bind(fbo0); } } // namespace MobileGL::MG_Impl