Hi Mark,

your input made me to search more and I found emscripten_GetProcAddress in
gl.c
( it can be used in user c/c++ code either as SDL_GL_GetProcAddress or
eglGetProcAddress )

this function resolves those  problems I tried to find answer in my header
message -and also addresses your comments on my attempts: if extension does
not exist in the system a 0 will be returned, and this function  allows
correct mapping of all declared  in
https://github.com/kripken/emscripten/blob/master/src/library_gl.js OpenGL
functions,

it is just pity that there was no much docs,

I found the solutions by searching Emscripten code,
in cubegeom_pre2_vao2.c which is among test files,   extensions are loaded
in emscripten friendly way, and  this approach will allow me not to change
header files, but at the same time use all available WebGL extensions.


Regards
Sergey

On Sat, Apr 4, 2015 at 10:54 AM, Sergey Kurdakov <[email protected]>
wrote:

> Hi Mark,
>
> my work is  progress, so will post results as soon as they are ready
>
> I might be wrong in some assumptions - but internally in both Chrome and
> Firefox those functions are implemented via call to Angle EXT functions
>
> Regards
> Sergey
>
> On Sat, Apr 4, 2015 at 2:59 AM, キャロウ マーク <[email protected]> wrote:
>
>>
>> > On Apr 2, 2015, at 1:43 PM, Sergey Kurdakov <[email protected]>
>> wrote:
>> >
>> > ...
>> >
>> > >I do not know which of the extensions you have mentioned are supported
>> by Emscripten’s OpenGL ES emulation.
>> >
>> > so those functions I mentioned in first email are supported ( it is
>> clear by looking at library_gl.js ) and more - they are implemented via
>> those IMG ANGLE functions at Windows platform in Firefox and Chrome -
>> >
>> > But correct headers for OpenGL ES programs using those functions to
>> work seamlessly are missing - one needs to fix headers manually so the
>> correct OpengGL ES program starts to compile to correct webgl program in
>> browser.
>> >
>>
>> You cannot assume from the similar names that the functions are
>> identical. You need to read the OpenGL ES extension specifications and
>> compare with the OpenGL specification.
>>
>> The correct way to fix this is for Emscripten’s OpenGL ES emulation to
>> expose these functions as the extensions they are. The implementations of
>> those extensions can share code with the implementations of the similar
>> functions in the OpenGL emulation.
>>
>> Regards
>>
>>     -Mark
>>
>> --
>> 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.
>>
>
>

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