Buckets:
| /* This header webgl1_ext.h provides static linkage entry points to all WebGL extensions that | |
| the Khronos WebGL registry adds on top of the WebGL 1 API. | |
| In Emscripten, all GL extension function entry points are provided via static linkage. | |
| For best WebGL performance, call the statically linked gl*() functions in this header | |
| instead of using a dynamic function pointers via the glGetProcAddress() function. | |
| Include this header instead of the headers GLES2/gl2ext.h or GL/glext.h if you are | |
| developing a WebGL renderer as a first tier platform, and want to get "fail fast" | |
| compiler errors of GL symbols that are not supported on WebGL. | |
| Other features: | |
| - If you want to use one of the WebGL specific extensions that do not exist in | |
| GLES or desktop GL (such as WEBGL_lose_context or WEBGL_debug_shaders), include | |
| this header to get the function declarations and defines. | |
| - Unlike GLES and desktop GL, in WebGL one must explicitly enable an extension | |
| before using it. See below in the section of each extension for instructions | |
| on how to enable it, or link with -sGL_SUPPORT_AUTOMATIC_ENABLE_EXTENSIONS=1 | |
| to automatically enable all non-debugging related WebGL extensions at startup. | |
| - If you are targeting multiple Emscripten compiler versions (e.g. a rendering | |
| library middleware), you can query whether static linkage to a particular | |
| extension is provided, by including this header and then checking | |
| #if EMSCRIPTEN_GL_WEBGL_polygon_mode | |
| // we can call glPolygonModeWEBGL() function | |
| #endif | |
| - To disable a particular WebGL extension from being declared in this header, | |
| you can add e.g. | |
| #define EMSCRIPTEN_GL_OES_texture_float 0 | |
| before including this header. | |
| - For technical reasons, each function declaration comes in two variants: | |
| a glFoo() declaration, and a second emscripten_glFoo() copy. | |
| The emscripten_glFoo() variants exist for internal *GetProcAddress() and | |
| Emscripten -sOFFSCREEN_FRAMEBUFFER=1 features linkage purposes, and should | |
| be ignored by end users. | |
| */ | |
| // 1. https://www.khronos.org/registry/webgl/extensions/OES_texture_float/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "OES_texture_float"); | |
| // <no functions exposed> | |
| // 2. https://www.khronos.org/registry/webgl/extensions/OES_texture_half_float/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "OES_texture_half_float"); | |
| // <no functions exposed> | |
| // 3. https://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/ | |
| //#define EMSCRIPTEN_GL_WEBGL_lose_context 1 | |
| // TODO: | |
| //WEBGL_APICALL EMSCRIPTEN_RESULT GL_APIENTRY emscripten_webgl_loseContext(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE contextHandle); | |
| //WEBGL_APICALL EMSCRIPTEN_RESULT GL_APIENTRY emscripten_webgl_restoreContext(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE contextHandle); | |
| // 4. https://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "OES_standard_derivatives"); | |
| // <no functions exposed> | |
| // 5. https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ | |
| // To enable: call | |
| bool emscripten_webgl_enable_OES_vertex_array_object(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context); | |
| // or link with -sGL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS=1 and | |
| // call emscripten_webgl_enable_extension(ctx, "OES_vertex_array_object"); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glBindVertexArrayOES(GLuint array); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glDeleteVertexArraysOES(GLsizei n, const GLuint * _Nonnull arrays); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glGenVertexArraysOES(GLsizei n, GLuint * _Nonnull arrays); | |
| WEBGL_APICALL GLboolean GL_APIENTRY emscripten_glIsVertexArrayOES(GLuint array); | |
| WEBGL_APICALL void GL_APIENTRY glBindVertexArrayOES(GLuint array); | |
| WEBGL_APICALL void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint * _Nonnull arrays); | |
| WEBGL_APICALL void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint * _Nonnull arrays); | |
| WEBGL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array); | |
| // 6. https://www.khronos.org/registry/webgl/extensions/WEBGL_debug_renderer_info/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_debug_renderer_info"); | |
| // <no functions exposed> | |
| // 7. https://www.khronos.org/registry/webgl/extensions/WEBGL_debug_shaders/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_debug_shaders"); | |
| //TODO: | |
| //WEBGL_APICALL void GL_APIENTRY emscripten_webgl_getTranslatedShaderSource(GLuint shader, GLsizei bufSize, GLsizei * _Nonnull length, GLchar * _Nonnull source); | |
| // 8. https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_s3tc"); | |
| // <no functions exposed> | |
| // 9. https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_depth_texture"); | |
| // <no functions exposed> | |
| // 10. https://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "OES_element_index_uint"); | |
| // <no functions exposed> | |
| // 11. https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_texture_filter_anisotropic"); | |
| // <no functions exposed> | |
| // 16. https://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_frag_depth"); | |
| // <no functions exposed> | |
| // 18. https://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/ | |
| // To enable: call | |
| bool emscripten_webgl_enable_WEBGL_draw_buffers(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context); | |
| // or link with -sGL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS=1 and | |
| // call emscripten_webgl_enable_extension(ctx, "WEBGL_draw_buffers"); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glDrawBuffersWEBGL(GLsizei n, const GLenum *buffers); | |
| WEBGL_APICALL void GL_APIENTRY glDrawBuffersWEBGL(GLsizei n, const GLenum *buffers); | |
| // 19. https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/ | |
| // To enable: call | |
| bool emscripten_webgl_enable_ANGLE_instanced_arrays(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context); | |
| // or link with -sGL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS=1 and | |
| // call emscripten_webgl_enable_extension(ctx, "ANGLE_instanced_arrays"); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor); | |
| WEBGL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); | |
| WEBGL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); | |
| WEBGL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor); | |
| // 20. https://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "OES_texture_float_linear"); | |
| // <no functions exposed> | |
| // 21. https://www.khronos.org/registry/webgl/extensions/OES_texture_half_float_linear/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "OES_texture_half_float_linear"); | |
| // <no functions exposed> | |
| // 25. https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_blend_minmax"); | |
| // <no functions exposed> | |
| // 27. https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_shader_texture_lod"); | |
| // <no functions exposed> | |
| // 13. https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_pvrtc"); | |
| // <no functions exposed> | |
| // 14. https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_color_buffer_half_float"); | |
| // <no functions exposed> | |
| // 15. https://www.khronos.org/registry/webgl/extensions/WEBGL_color_buffer_float/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_color_buffer_float"); | |
| // <no functions exposed> | |
| // 17. https://www.khronos.org/registry/webgl/extensions/EXT_sRGB/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_sRGB"); | |
| // <no functions exposed> | |
| // 24. https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc1/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_etc1"); | |
| // <no functions exposed> | |
| // 26. https://www.khronos.org/registry/webgl/extensions/EXT_disjoint_timer_query/ | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glGenQueriesEXT(GLsizei n, GLuint * _Nonnull ids); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glDeleteQueriesEXT(GLsizei n, const GLuint * _Nonnull ids); | |
| WEBGL_APICALL GLboolean GL_APIENTRY emscripten_glIsQueryEXT(GLuint id); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glBeginQueryEXT(GLenum target, GLuint id); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glEndQueryEXT(GLenum target); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glQueryCounterEXT(GLuint id, GLenum target); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glGetQueryivEXT(GLenum target, GLenum pname, GLint * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint * _Nonnull ids); | |
| WEBGL_APICALL void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint * _Nonnull ids); | |
| WEBGL_APICALL GLboolean GL_APIENTRY glIsQueryEXT(GLuint id); | |
| WEBGL_APICALL void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint id); | |
| WEBGL_APICALL void GL_APIENTRY glEndQueryEXT(GLenum target); | |
| WEBGL_APICALL void GL_APIENTRY glQueryCounterEXT(GLuint id, GLenum target); | |
| WEBGL_APICALL void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 * _Nonnull params); | |
| WEBGL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 * _Nonnull params); | |
| // 29. https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_etc"); | |
| // <no functions exposed> | |
| // 30. https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_astc"); | |
| //TODO: | |
| //WEBGL_APICALL void GL_APIENTRY emscripten_webgl_getSupportedAstcProfiles(GLsizei bufSize, GLsizei * _Nonnull length, GLchar * _Nonnull buf); | |
| // 31. https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_float/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_color_buffer_float"); | |
| // <no functions exposed> | |
| // 32. https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_s3tc_srgb"); | |
| // <no functions exposed> | |
| // 37. https://www.khronos.org/registry/webgl/extensions/KHR_parallel_shader_compile/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "KHR_parallel_shader_compile"); | |
| // <no functions exposed> | |
| // 40. https://www.khronos.org/registry/webgl/extensions/WEBGL_multi_draw/ | |
| // To enable: call | |
| bool emscripten_webgl_enable_WEBGL_multi_draw(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context); | |
| // or link with -sGL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS=1 and | |
| // call emscripten_webgl_enable_extension(ctx, "WEBGL_multi_draw"); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glMultiDrawArraysWEBGL(GLenum mode, | |
| const GLint* _Nonnull firsts, | |
| const GLsizei* _Nonnull counts, | |
| GLsizei drawcount); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glMultiDrawArraysInstancedWEBGL(GLenum mode, | |
| const GLint* _Nonnull firsts, | |
| const GLsizei* _Nonnull counts, | |
| const GLsizei* _Nonnull instanceCounts, | |
| GLsizei drawcount); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glMultiDrawElementsWEBGL(GLenum mode, | |
| const GLsizei* _Nonnull counts, | |
| GLenum type, | |
| const GLvoid* const* _Nonnull offsets, | |
| GLsizei drawcount); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glMultiDrawElementsInstancedWEBGL(GLenum mode, | |
| const GLsizei* _Nonnull counts, | |
| GLenum type, | |
| const GLvoid* const* _Nonnull offsets, | |
| const GLsizei* _Nonnull instanceCounts, | |
| GLsizei drawcount); | |
| WEBGL_APICALL void GL_APIENTRY glMultiDrawArraysWEBGL(GLenum mode, | |
| const GLint* _Nonnull firsts, | |
| const GLsizei* _Nonnull counts, | |
| GLsizei drawcount); | |
| WEBGL_APICALL void GL_APIENTRY glMultiDrawArraysInstancedWEBGL(GLenum mode, | |
| const GLint* _Nonnull firsts, | |
| const GLsizei* _Nonnull counts, | |
| const GLsizei* _Nonnull instanceCounts, | |
| GLsizei drawcount); | |
| WEBGL_APICALL void GL_APIENTRY glMultiDrawElementsWEBGL(GLenum mode, | |
| const GLsizei* _Nonnull counts, | |
| GLenum type, | |
| const GLvoid* const* _Nonnull offsets, | |
| GLsizei drawcount); | |
| WEBGL_APICALL void GL_APIENTRY glMultiDrawElementsInstancedWEBGL(GLenum mode, | |
| const GLsizei* _Nonnull counts, | |
| GLenum type, | |
| const GLvoid* const* _Nonnull offsets, | |
| const GLsizei* _Nonnull instanceCounts, | |
| GLsizei drawcount); | |
| // 44. https://www.khronos.org/registry/webgl/extensions/EXT_texture_norm16/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_texture_norm16"); | |
| // <no functions exposed> | |
| // EMSCRIPTEN_explicit_uniform_location | |
| // https://github.com/emscripten-core/emscripten/blob/main/docs/EMSCRIPTEN_explicit_uniform_location.txt | |
| // To enable: link with -sGL_EXPLICIT_UNIFORM_LOCATION=1 | |
| // <no functions exposed> | |
| // EMSCRIPTEN_explicit_uniform_binding | |
| // https://github.com/emscripten-core/emscripten/blob/main/docs/EMSCRIPTEN_explicit_uniform_binding.txt | |
| // To enable: link with -sGL_EXPLICIT_UNIFORM_BINDING=1 | |
| // <no functions or defines exposed> | |
| // 50. https://registry.khronos.org/webgl/extensions/EXT_polygon_offset_clamp/ | |
| // To enable: call | |
| bool emscripten_webgl_enable_EXT_polygon_offset_clamp(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context); | |
| // or link with -sGL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS=1 and | |
| // call emscripten_webgl_enable_extension(ctx, "EXT_polygon_offset_clamp"); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glPolygonOffsetClampEXT(GLfloat factor, GLfloat units, GLfloat clamp); | |
| WEBGL_APICALL void GL_APIENTRY glPolygonOffsetClampEXT(GLfloat factor, GLfloat units, GLfloat clamp); | |
| // 51. https://registry.khronos.org/webgl/extensions/EXT_clip_control/ | |
| // To enable: call | |
| bool emscripten_webgl_enable_EXT_clip_control(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context); | |
| // or link with -sGL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS=1 and | |
| // call emscripten_webgl_enable_extension(ctx, "EXT_clip_control"); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glClipControlEXT(GLenum origin, GLenum depth); | |
| WEBGL_APICALL void GL_APIENTRY glClipControlEXT(GLenum origin, GLenum depth); | |
| // 52. https://registry.khronos.org/webgl/extensions/EXT_depth_clamp/ | |
| // To enable: call emscripten_webgl_enable_extension(ctx, "EXT_depth_clamp"); | |
| // <no functions exposed> | |
| // 53. https://registry.khronos.org/webgl/extensions/WEBGL_polygon_mode/ | |
| // To enable: call | |
| bool emscripten_webgl_enable_WEBGL_polygon_mode(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context); | |
| // or link with -sGL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS=1 and | |
| // call emscripten_webgl_enable_extension(ctx, "WEBGL_polygon_mode"); | |
| WEBGL_APICALL void GL_APIENTRY emscripten_glPolygonModeWEBGL(GLenum face, GLenum mode); | |
| WEBGL_APICALL void GL_APIENTRY glPolygonModeWEBGL(GLenum face, GLenum mode); | |
| /* To add a new GL extension here, follow the template | |
| // <num>. <online URL to extension documentation> | |
| #ifndef EMSCRIPTEN_GL_<extension_name> | |
| #ifndef EMSCRIPTEN_GL_<extension_name> 1 | |
| // To enable: <enable_instructions> | |
| <exposed defines> | |
| <exposed emscripten_gl* function declarations> | |
| <exposed gl* function declarations> | |
| #endif | |
| */ | |
Xet Storage Details
- Size:
- 29.7 kB
- Xet hash:
- 8dad12116843c0cb98a634621465753838c373b10f76cf548ae4c888753db562
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.