Merge remote-tracking branch 'refs/remotes/origin/Feat/Backend-Direct-GLES' into Feat/Backend-Direct-GLES

This commit is contained in:
BZLZHH
2026-02-03 17:30:47 +08:00
3 changed files with 9 additions and 2 deletions
@@ -242,7 +242,12 @@ namespace MobileGL::MG_Backend::DirectGLES {
MG_State::GLState::FramebufferObject* lastUpdatedFBO = nullptr;
for (auto target : fboTargets) {
auto currentFBO = MG_State::pGLContext->GetFramebufferBindingSlot(target).GetBoundObject();
auto slot = MG_State::pGLContext->GetFramebufferBindingSlot(target);
auto version = slot.GetVersion();
if (version == g_fboBindVersions[SizeT(target)])
continue;
auto currentFBO = slot.GetBoundObject();
if (!currentFBO) {
MGLOG_E("No FBO is currently bound, cannot sync current FBO.");
@@ -269,7 +274,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
backendFBOObject->SyncToBackend(currentFBO, target);
}
backendFBOObject->Bind(target);
// backendFBOObject->Bind(target);
lastUpdatedFBO = currentFBO.get();
}
@@ -987,6 +987,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
UnorderedMap<SharedPtr<MG_State::GLState::FramebufferObject>, SharedPtr<BackendFramebufferObject>>
g_backendFramebufferObjects;
Array<Uint16, SizeT(FramebufferTarget::FramebufferTargetCount)> g_fboBindVersions = {0};
} // namespace FramebufferImpl
namespace PrgramImpl {
@@ -170,6 +170,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
extern UnorderedMap<SharedPtr<MG_State::GLState::FramebufferObject>, SharedPtr<BackendFramebufferObject>>
g_backendFramebufferObjects;
extern Array<Uint16, SizeT(FramebufferTarget::FramebufferTargetCount)> g_fboBindVersions;
} // namespace FramebufferImpl
namespace PrgramImpl {