I'm putting together a OpenGL based framework that can be built to target 
either desktop or WebGl via emscripten. Couple of questions -

First, the emscripten docs talk about targeting either a 'WebGl friendly 
subset' of OpenGL ES by using the system/include/GLES2 headers or 'OpenGL 
ES 2.0' emulation by setting the '-s FULL_ES2=1' compiler flag. There are 
also a set of GLES 3.0 headers in system/include/GLES3, but I can't seem to 
find a good description about the current status of this code. Is it safe 
to target emscripten to GLES 3.0 at this point, or is this still a work in 
progress? If I target GLES3, will this automatically invoke WebGl 2 in the 
browser? What problems might I encounter? (BTW, I'm currently using a GLFW 
wrapper).

Second, If I do target GLES3/WebGL2, is there any way to gracefully 
fallback to WebGL 1 if it turns out that the browser doesn't yet support 
WebGL 2? I'm guessing that this would probably involve some sort of 
bootstrap check that would determine feature support and then either pull 
in a GLES2 or GLES3 targeted main application. What is the best way to test 
for WebGL support before loading my script?

Going into this I was hoping that things were far enough along so that I 
could just target WebGL 2 exclusively, but it seems like we're once again 
in an awkward transition phase. *sigh*
Thanks for any insight!

Brian

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to