Hi,

this is not really a feature request, more a thought in progress. I think 
the current way to initialize a WebGL context via glut, EGL or SDL is the 
right way for most code bases since it allows easy porting of existing 
code. BUT both glutCreateWindow and EGL do little more then calling 
Browser.createContext (haven't looked at the SDL wrapper yet), but each 
wrapper comes with overhead (for instance, EGL has code which emulates the 
EGL setup calls, even though most of this stuff isn't even used/needed, and 
GLUT also initializes input event listening code).

I was wondering whether it would make sense to have a minimalistic C 
interface to Browser.createContext which would only allow to configure the 
webGLContextAttributes (maybe emscripten_canvas_create_context()?). 

Also, the html5.h functionality goes a little bit into that direction to 
offer emscripten-specific functionality with as little overhead as possible.

My "usage scenario" is this: I want to create an absolutely minimalistic 3D 
engine which really tries reduce client size as much as possible, for input 
handling I will use the new html5.h functions, but for display 
setup/management I still need to use either glut or EGL, both solutions 
have drawbacks (glut has its own input handling, EGL doesn't allow yet to 
configure some WebGL context attributes, and has some JS size overhead for 
EGL functionality that isn't really needed in a WebGL environment).

So... thoughts? As I said, the current solutions work just fine, but each 
has some drawbacks/overhead, and I always found the emscripten_xxx API 
functions very enjoyable to work with.

Cheers,
-Floh.

-- 
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