We currently have a way to create a WebGL2 context, but this context still uses the old OpenGL/GLES headers and contexts. We need it to use the new OpenGL headers (gl3.h?) and the GLES 3.0 resources. Ideally I would like to simply replace all instances of gl.h with gl3.h and GLES2.0 with GLES3.0 but I’m not sure the newer stuff is fully backwards compatible with the older stuff. I know that if I have to do this I’ll have to replace calls in WebKit that use various extension calls (like renderbufferStorageMultisampleEXT) If I cannot do this, I’ll have to create two different GraphicsContexts, one for WebGL2 and one for WebGL1, which would be unfortunate.
I suggest you to take a look on libepoxy. See https://bugs.webkit.org/show_bug.cgi?id=146680 for a summary of what this library can do, also check https://github.com/anholt/libepoxy Maybe it can help with this problem ?
Repurposing this bug to be about adopting Open GL ES 3.0 as a backend for WebGL2 contexts.
<rdar://problem/25651492>
Created attachment 276135 [details] Patch
Comment on attachment 276135 [details] Patch I wonder if there is a way to test this. Maybe by getParameter(RENDERER)? Although "This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release." Hmm, UNMASKED_RENDERER_WEBGL should probably work. You'd need to get it via the https://www.khronos.org/registry/webgl/extensions/WEBGL_debug_renderer_info/ extension. I think we have a testcase that can be used as a base.
(In reply to comment #5) > > Hmm, UNMASKED_RENDERER_WEBGL should probably work. You'd need to get it via > the > https://www.khronos.org/registry/webgl/extensions/WEBGL_debug_renderer_info/ > extension. I think we have a testcase that can be used as a base. It doesn't. gl.getParameter(extension.UNMASKED_RENDERER_WEBGL) on an iOS device gives something like Apple A8X GPU
Comment on attachment 276135 [details] Patch Adding r+. I think we want to expose something via Internals that allows us to get more info on the context being used. Can you file a bug?
Comment on attachment 276135 [details] Patch Clearing flags on attachment: 276135 Committed r199314: <http://trac.webkit.org/changeset/199314>
All reviewed patches have been landed. Closing bug.