[Fix] (MG_State/Framebuffer): properly bump FBO version

This commit is contained in:
2026-02-05 12:20:06 +08:00
parent 6855ae42ef
commit 4bfa8ce934
2 changed files with 1 additions and 2 deletions
@@ -143,7 +143,7 @@ namespace MobileGL {
void FramebufferObject::SetDrawBuffer(Uint index, FramebufferAttachmentType buffer) { void FramebufferObject::SetDrawBuffer(Uint index, FramebufferAttachmentType buffer) {
if (m_drawBuffers[index] == buffer) return; if (m_drawBuffers[index] == buffer) return;
m_drawBuffers[index] = buffer; m_drawBuffers[index] = buffer;
++m_attachmentVersions[static_cast<SizeT>(buffer)]; BumpAttachmentVersion(buffer);
} }
const FramebufferObject::FramebufferAttachmentArray& FramebufferObject::GetDrawBuffers() const { const FramebufferObject::FramebufferAttachmentArray& FramebufferObject::GetDrawBuffers() const {
@@ -128,7 +128,6 @@ namespace MobileGL {
private: private:
void BumpAttachmentVersion(FramebufferAttachmentType type); void BumpAttachmentVersion(FramebufferAttachmentType type);
void BumpBufferAttachVersion();
const Uint m_externalIndex = 0; const Uint m_externalIndex = 0;
FramebufferAttachmentObjectArray m_attachmentObjects; FramebufferAttachmentObjectArray m_attachmentObjects;