emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
2.96k stars 676 forks source link

GL3 Header is wrong (Generated for GLES2?) #1275

Closed manuel5975p closed 11 months ago

manuel5975p commented 11 months ago

This is an excerpt from emscriptens gl3.h

/* Generated C header for:
 * API: gles2
 * Profile: common
 * Versions considered: 2\.[0-9]|3\.0
 * Versions emitted: .*
 * Default extensions included: None
 * Additional extensions included: _nomatch_^
 * Extensions removed: _nomatch_^
 */

Clearly this is not right. Furthermore, a compilation error arises when compiling programs with the gl3 header, namely things like

emsdk/upstream/emscripten/cache/sysroot/include/GLES3/gl3.h:389:28: error: expected ')'
  389 | typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);

because apparently macros like GL_APIENTRYP are not defined properly. If I define them by hand I can get the program to compile, but it will leave several gles 3.0 / glsl 3.00 es features broken.

I will gladly create a reproducible repo for all of this, but It seems like the big issue is that the gl3.h was generated for the wrong version.