Closed Bug 1201923 Opened 9 years ago Closed 8 years ago

glGetString(GL_SHADING_LANGUAGE_VERSION) reports "OpenGL ES GLSL 1.00 (WebGL)" in WebGL2 context

Categories

(Core :: Graphics: CanvasWebGL, defect)

43 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: robert.goulet, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36

Steps to reproduce:

Call "glGetString(GL_SHADING_LANGUAGE_VERSION)" in WebGL2 context canvas


Actual results:

Reports "OpenGL ES GLSL 1.00 (WebGL)"


Expected results:

It should report "OpenGL ES GLSL 3.00 (WebGL2)"
OS: Unspecified → Windows 8.1
Hardware: Unspecified → x86_64
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → UNCONFIRMED
Ever confirmed: false
User Agent 	Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0
Version 	46.0a1
Build ID 	20160113030207
Channel 	nightly 
and Firefox 43.0

Hi Robert,
Thank you for taking time to report this.
Are you still able to reproduce this in the latest version ?  Can you give detail steps to reproduce this ? Thanks again.
Flags: needinfo?(robert.goulet)
See Also: → 1233834
Yes I can repro it with FF Nightly 46.0a1 (2016-01-13).

Calling glGetString(GL_SHADING_LANGUAGE_VERSION) (from C++ compiled code through Emscripten) returns "OpenGL ES GLSL 1.00 (WebGL)" when the canvas was created for WebGL2. That's wrong since WebGL2 runs on GLSL3.
Flags: needinfo?(robert.goulet)
This is (incorrectly) hardcoded in emscripten:

  https://github.com/kripken/emscripten/blob/master/src/library_gl.js#L730

Should be filed/fixed there.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
FWIW -- the value that should be reported (and is, according to spec) is: "WebGL GLSL ES 3.00".  Emscripten reports its own because it wants to pretend to be true OpenGL ES, not WebGL.
Ok thank you, I can probably fix it myself then. Thanks!
You need to log in before you can comment on or make changes to this bug.