Skip to content

Fix shading language version detection when using WebGL#746

Closed
kblaschke wants to merge 1 commit intomasterfrom
bugfix/fix-shading-language-detection-with-webgl
Closed

Fix shading language version detection when using WebGL#746
kblaschke wants to merge 1 commit intomasterfrom
bugfix/fix-shading-language-detection-with-webgl

Conversation

@kblaschke
Copy link
Member

WebGL doesn't follow the OpenGL standard format for the glGetString(GL_SHADING_LANGUAGE_VERSION) return value. Chrome for example will return "OpenGL ES GLSL ES 3.00 (WebGL GLSL ES 3.00 (OpenGL ES GLSL ES 3.0 Chromium))", which does not start with the version number as the standard suggests.

This fix will simply cut off any text preceding the first digit found in the string, if any.

WebGL doesn't follow the OpenGL standard format for the glGetString(GL_SHADING_LANGUAGE_VERSION) return value. Chrome for example will return "OpenGL ES GLSL ES 3.00 (WebGL GLSL ES 3.00 (OpenGL ES GLSL ES 3.0 Chromium))", which does not start with the version number as the standard suggests.

This fix will simply cut off any text preceding the first digit found in the string, if any.
@kblaschke kblaschke added this to the 4.1 milestone Nov 24, 2023
@kblaschke kblaschke added the bug The issue is (potentially) a bug. label Nov 24, 2023
@kblaschke kblaschke self-assigned this Nov 24, 2023
@kblaschke
Copy link
Member Author

Merged.

@kblaschke kblaschke closed this Nov 25, 2023
@kblaschke kblaschke deleted the bugfix/fix-shading-language-detection-with-webgl branch November 25, 2023 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug The issue is (potentially) a bug.

Projects

Development

Successfully merging this pull request may close these issues.

2 participants