Skip to content

Commit 0ee31e6

Browse files
committed
Work around glObjectLabel problem with GLES
1 parent 12e86d3 commit 0ee31e6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

irr/src/OpenGLES2/DriverGLES2.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,14 @@ void COpenGLES2Driver::initFeatures()
120120
BlendMinMaxSupported = (Version.Major >= 3) || FeatureAvailable[IRR_GL_EXT_blend_minmax];
121121
TextureMultisampleSupported = isVersionAtLeast(3, 1);
122122
Texture2DArraySupported = Version.Major >= 3 || queryExtension("GL_EXT_texture_array");
123-
KHRDebugSupported = queryExtension("GL_KHR_debug");
124-
if (KHRDebugSupported)
125-
MaxLabelLength = GetInteger(GL.MAX_LABEL_LENGTH);
123+
// FIXME: on GLES the functions are suffixed, but our loader code ignores
124+
// this and violates the spec (see #15830). This happens to work on Mesa
125+
// nonetheless so continue allowing this useful debug feature there.
126+
if (Name.find("Mesa") != -1) {
127+
KHRDebugSupported = queryExtension("GL_KHR_debug");
128+
if (KHRDebugSupported)
129+
MaxLabelLength = GetInteger(GL.MAX_LABEL_LENGTH);
130+
}
126131
RenderToFloatTextureSupported = isVersionAtLeast(3, 2)|| queryExtension("GL_EXT_color_buffer_float");
127132

128133
// COGLESCoreExtensionHandler::Feature

0 commit comments

Comments
 (0)