Skip to content

Missing OpenGL ES 2 extension function aliases #3471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2015
Merged

Missing OpenGL ES 2 extension function aliases #3471

merged 3 commits into from
May 27, 2015

Conversation

mosra
Copy link
Contributor

@mosra mosra commented May 24, 2015

Since the WEBGL_draw_buffers WebGL extension is based on EXT_draw_buffers ES2 extension and ANGLE_instanced_arrays WebGL extension is based on ANGLE_instanced_arrays ES2 extension, I thought it would make sense to expose also functions that are present in ES2 extension headers:

glDrawBuffersEXT()
glVertexAttribDivisorANGLE()
glDrawArraysInstancedANGLE()
glDrawElementsInstancedANGLE()

This should also partially fix #2510, except for additions to the headers (I'm using my own headers generated using flextGL so that doesn't bother me).

I looked around the code to discover what's the actual policy for extension function suffixes, but it seems that all suffixes of given function are always present without checking whether we are on legacy GL emulation, WebGL-friendly subset or else, so I just added these to existing aliases.

Note: if I understand correctly, the WEBGL_draw_buffers and ANGLE_instanced_arrays extensions shouldn't be exposed on WebGL 2 (because the above functions are then in core), thus aliases with these suffixes also shouldn't be present for WebGL 2, but maybe that's not a problem here.

Thanks!

mosra added 2 commits May 24, 2015 16:03
The extension is based on EXT_draw_buffers ES2 extension, which has
functions with EXT suffix.
@kripken
Copy link
Member

kripken commented May 26, 2015

@juj, what do you think?

@juj juj added the GL label May 27, 2015
@juj
Copy link
Collaborator

juj commented May 27, 2015

I'm ok with these being added. @mosra: Can you add your name to the file AUTHORS?(https://github.com/kripken/emscripten/blob/incoming/AUTHORS).

In desktop OpenGL, the convention is that implementations may continue to advertise an extension even after it is merged to core (and in the case the core functionality and the extension have functional differences, the differences will be preserved). I think we can just keep it simple and do the same here unconditionally.

If you have a small test available, that would be nice.

@mosra
Copy link
Contributor Author

mosra commented May 27, 2015

@juj: done.

Unfortunately I don't have any small and self-contained test, sorry.

juj added a commit that referenced this pull request May 27, 2015
Missing OpenGL ES 2 extension function aliases
@juj juj merged commit 8e5230c into emscripten-core:incoming May 27, 2015
@mosra mosra deleted the es2-extension-aliases branch May 27, 2015 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please add ANGLE_instanced_arrays support to GLES2 wrapper
3 participants