Browse Source

external: add a glGetBufferSubData() entrypoint on WebGL 2.

Yay, I can abuse/reuse the features I had to add to flextGL because of
GOOGLE!!!, and with only one additional patch to support local xml
files I can very conveniently include whatever entrypoints I need.
pull/554/head
Vladimír Vondruš 4 years ago
parent
commit
835f339dd2
  1. 3
      src/MagnumExternal/OpenGL/GLES3/Emscripten/extensions.txt
  2. 24
      src/MagnumExternal/OpenGL/GLES3/Emscripten/webgl.xml
  3. 4
      src/MagnumExternal/OpenGL/GLES3/flextGLEmscripten.h

3
src/MagnumExternal/OpenGL/GLES3/Emscripten/extensions.txt vendored

@ -5,6 +5,7 @@
version 3.0 es
extraspec https://raw.githubusercontent.com/google/angle/master/scripts/gl_angle_ext.xml
extraspec webgl.xml
extension EXT_texture_filter_anisotropic optional
# It's actually EXT_disjoint_timer_query_webgl2, but that's not known to gl.xml
@ -35,6 +36,8 @@ extension ANGLE_base_vertex_base_instance optional
# fortunately ES3 defines these constants on its own so I don't need it anyway.
# extension ANGLE_compressed_texture_etc optional
extension MAGNUM_what_webgl_has_but_es_not optional
begin functions blacklist
# Not present in WEBGL_blend_equation_advanced_coherent
BlendBarrierKHR

24
src/MagnumExternal/OpenGL/GLES3/Emscripten/webgl.xml vendored

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<registry>
<comment>
This contains signatures of functions that are in WebGL 2 but not in ES
and (of course) gl.xml doesn't bother adding any WebGL-specific special
case.
</comment>
<!-- SECTION: GL command definitions. -->
<commands namespace="GL">
<!-- glGetBufferSubData is defined in gl.xml already, so nothing to do
here. It only needs to be required from some extension that's then
listed in extensions.txt. -->
</commands>
<!-- SECTION: MAGNUM extension interface definitions -->
<extensions>
<extension name="GL_MAGNUM_what_webgl_has_but_es_not" supported="gles2">
<require>
<command name="glGetBufferSubData"/>
</require>
</extension>
</extensions>
</registry>

4
src/MagnumExternal/OpenGL/GLES3/flextGLEmscripten.h vendored

@ -1173,6 +1173,10 @@ GLAPI void glDisableiEXT(GLenum, GLuint);
GLAPI void glEnableiEXT(GLenum, GLuint);
GLAPI GLboolean glIsEnablediEXT(GLenum, GLuint);
/* GL_MAGNUM_what_webgl_has_but_es_not */
GLAPI void glGetBufferSubData(GLenum, GLintptr, GLsizeiptr, void *);
/* GL_OVR_multiview */
GLAPI void glFramebufferTextureMultiviewOVR(GLenum, GLenum, GLuint, GLint, GLint, GLsizei);

Loading…
Cancel
Save