Hi,

I started to update my port of osg to emscripten

and I have following questions ( though I will resolve them by manual
header file change, the questions seems of interest to others ).

as far as I understand, library_gl.js replaces

gl calls in  C code by name.

Now,there are few special cases when  functions are available via
library_gl.js
but cannot be found in  OpenGL ES header files supplied with EMSCRIPTEN.

say

https://github.com/kripken/emscripten/blob/master/system/include/GLES2/gl2ext.h

declares
GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum,
GLsizei, GLenum, GLsizei, GLsizei);

and there is

glRenderbufferStorageMultisample in library_gl.js

if someone  has a C program with glRenderbufferStorageMultisampleIMG   this
call will not be mapped ( though internally this function will be used by
WebGL), but if someone uses
glRenderbufferStorageMultisample it will be ok.
but
glRenderbufferStorageMultisample is declared in gl/gl.h

but mixing gl/gl.h and  GLES2 gl2.h/gl2ext.h headers might cause conflicts.

there are other combinations.

say glBlitFramebuffer is in

https://github.com/kripken/emscripten/blob/master/src/library_gl.js

but there is no corresponding function declared in

https://github.com/kripken/emscripten/blob/master/system/include/GLES2/gl2ext.h
or
https://github.com/kripken/emscripten/blob/master/system/include/GLES2/gl2.h

( this function appears in ES 3.0/webgl 2.0 but I do not see guards against
it's use with WebGL 1.0 code, and else l glBlitFramebufferANGLE exists in
ANGLE but it's not declared at all in above two files)

so it will be nice to have a standard approach in described situation  -
when there is an available webgl function which is possible to use in
OpenGL ES 2.0 in ANGLE based application ( it's nice to debug at desctop
prior to compiling code to emscripten ), but there is no  straightforward
way to 'compile' into valid webgl code without changing stock header files
and no
 additional  information is provided
at
http://kripken.github.io/emscripten-site/docs/porting/multimedia_and_graphics/OpenGL-support.html#opengl-support-webgl-subset

Regards
Sergey

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