glGetString(GL_EXTENSIONS) is supported in Emscripten GL library. Even though WebGL itself doesn't have that function (by http://www.khronos.org/registry/webgl/specs/latest/1.0/#6.15 ), the Emscripten GL library layer implements it and routes it to getSupportedExtensions(), to present the GLES2-conformant API. All feature extensions are enabled by default, debugging extensions that might have a performance impact are not. See https://github.com/kripken/emscripten/blob/master/src/library_gl.js#L633
The GL_INVALID_ENUMs are most likely due to enums being used that are not part of GLES2, or in a few rare cases, not part of the common GLES2/WebGL subset (I've met perhaps one such case with depth-stencil enums). What are the enums in question? To access the extension object, you can write normal JavaScript, and access the Module['context'] variable for the GL context. 2014-02-12 8:46 GMT+02:00 Joel Croteau <[email protected]>: > How are WebGL extensions handled through the GLES2 API in Emscripten? > Calls to glGetString(GL_EXTENSIONS are not supported in WebGL, does this > map to getSupportedExtensions? How about loading extensions? Are all > extensions loaded automatically, how is this done? I have gotten multiple > invalid enum errors from my code, which I presume are due to extensions not > properly loaded, or having different enum values from what is hardcoded > into the header files. Is there a way to access the extension object > returned by getExtension? > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
