[Fix] (MG_Util/Converters): properly handle GL_NONE in ConvertGLEnumToFramebufferAttachmentType

This commit is contained in:
2026-02-03 13:06:55 +08:00
parent 6823b1e46a
commit 751c5745b0
@@ -30,13 +30,14 @@ namespace MobileGL {
} }
switch (attachment) { switch (attachment) {
case GL_DEPTH_ATTACHMENT: case GL_NONE:
return FramebufferAttachmentType::Depth; return FramebufferAttachmentType::None;
case GL_STENCIL_ATTACHMENT: case GL_DEPTH_ATTACHMENT:
return FramebufferAttachmentType::Stencil; return FramebufferAttachmentType::Depth;
case GL_UNKNOWN_MGL: case GL_STENCIL_ATTACHMENT:
default: return FramebufferAttachmentType::Stencil;
return FramebufferAttachmentType::Unknown; default:
return FramebufferAttachmentType::Unknown;
} }
} }