From f865d231d02d0d4133c2df34c27e8bf0ce9c914f Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Sun, 14 Sep 2025 07:43:47 +0800 Subject: [PATCH] [Chore] (MG_Backend/Backends): Upgrade target OpenGL version to 3.3 * This is to align target OpenGL version with Minecraft 25w37a, which raised the minimum required OpenGL version to 3.3 * With this upgrade, the following features become part of the project's possible implementation scope: - Sampler Objects (ARB_sampler_objects) - Instanced arrays (ARB_instanced_arrays) - Explicit attribute locations (ARB_explicit_attrib_location) - Dual-source blending (ARB_blend_func_extended) - Timer queries (ARB_timer_query) * These capabilities may be leveraged in future work depending on project needs --- MobileGL/MG_Backend/Backends.h | 60 +++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/MobileGL/MG_Backend/Backends.h b/MobileGL/MG_Backend/Backends.h index 71a1f856..1c71f70b 100644 --- a/MobileGL/MG_Backend/Backends.h +++ b/MobileGL/MG_Backend/Backends.h @@ -6,15 +6,18 @@ namespace MobileGL { namespace MG_Backend { namespace Unknown { - const RendererInfo RendererInfoUnknown = {"", - "", - ", ", - { - {0, 0, 0}, - {0, 0, 0}, - {}, + const RendererInfo RendererInfoUnknown = { + "", // Renderer Name + "", // Backend Name + ", ", // Extra vendor + { // OpenGL Info + {3, 3, 0}, // Target OpenGL Version + {4, 6, 0}, // Target Shading Language Version + { }, // OpenGL Extensions + false // Is Compatibility Profile }, - {}}; + { } // Backend Capability + }; } namespace Diligent { @@ -24,23 +27,34 @@ namespace MobileGL { }; const RendererInfo RendererInfoVulkan = { - "MobileGlued-vk", - "Diligent Engine (Vulkan)", - Nullopt, - {{3, 2, 0}, {4, 5, 0}, {V_OpenGL30, V_OpenGL31, V_OpenGL32}, false}, - {}}; - - const RendererInfo RendererInfoMetal = {"MobileGlued-mtl", - "Diligent Engine (Metal)", - Nullopt, - { - {3, 2, 0}, - {4, 5, 0}, - {V_OpenGL30, V_OpenGL31, V_OpenGL32}, + "MobileGlued-vk", // Renderer Name + "Diligent Engine (Vulkan)", // Backend Name + Nullopt, // Extra vendor + { // OpenGL Info + {3, 3, 0}, // Target OpenGL Version + {4, 6, 0}, // Target Shading Language Version + {V_OpenGL30, V_OpenGL31, V_OpenGL32, // OpenGL Extensions + V_OpenGL33}, + false // Is Compatibility Profile }, - {}}; + { } // Backend Capability + }; + + const RendererInfo RendererInfoMetal = { + "MobileGlued-mtl", // Renderer Name + "Diligent Engine (Metal)", // Backend Name + Nullopt, // Extra vendor + { // OpenGL Info + {3, 3, 0}, // Target OpenGL Version + {4, 6, 0}, // Target Shading Language Version + {V_OpenGL30, V_OpenGL31, V_OpenGL32, // OpenGL Extensions + V_OpenGL33}, + false // Is Compatibility Profile + }, + { } // Backend Capability + }; } // namespace Diligent void Init(); } // namespace MG_Backend -} // namespace MobileGL \ No newline at end of file +} // namespace MobileGL