Thanks for confirming this! I create my context using glfwOpenWindow so 
most likely all extensions are enabled, and this is exactly what I want.

By the way, when is Emscripten GLFW support going to be upgraded to 3.x? 
The API is quite different, and it would be nice to be able to share the 
code between the Linux and the Emscripten build...


On Wednesday, August 27, 2014 4:42:13 AM UTC-4, jj wrote:
>
> Robert, the scenario you are describing sounds fine. You should not need 
> to manually enable the extension, unless you opted to disable the 
> default-enabling of extensions by explicitly calling 
> emscripten_webgl_create_context with enableExtensionsByDefault set to false.
>
>
> 2014-08-27 11:39 GMT+03:00 Jukka Jylänki <[email protected] <javascript:>>:
>
>> We do automatically enable WEBGL_draw_buffers and all other GL extension 
>> by default, to provide GLES2-esque treatise of this for native code. See 
>> https://github.com/kripken/emscripten/blob/master/src/library_gl.js#L852 
>> . This occurs for code that initializes a GL extension via the emulated 
>> APIs like SDL, EGL, GLUT and GLEW. People haven't reported this to be a 
>> performance issue.
>>
>> For HTML5/WebGL-aware context creation (emscripten_webgl_create_context: 
>> https://github.com/kripken/emscripten/blob/master/system/include/emscripten/html5.h#L366
>>  
>> ) , there is a field enableExtensionsByDefault ( 
>> https://github.com/kripken/emscripten/blob/master/system/include/emscripten/html5.h#L361
>>  
>> ), which allows choosing whether the GL extensions are default-enabled or 
>> whether the application would like to manually call 
>> emscripten_webgl_enable_extension ( 
>> https://github.com/kripken/emscripten/blob/master/system/include/emscripten/html5.h#L374
>>  
>> ) instead to track the extensions it wishes to enable.
>>
>> Calling glGetString(GL_EXTENSIONS) does not enable extensions.
>>
>> 2014-08-26 20:39 GMT+03:00 Mark Callow <[email protected] 
>> <javascript:>>:
>>
>>   On 2014/08/24 10:53, Robert Goulet wrote:
>>>  
>>> It is supported by my browser. So basically I can just call 
>>> glDrawBuffers and it should just work? Thank you.
>>>
>>>  In WebGL, extensions must be enabled before use otherwise errors will 
>>> be raised. WEBGL_draw_buffers is obviously a WebGL extension.
>>>
>>> If Emscripten wishes to support use of WebGL extensions via glGetString 
>>> & eglGetProcAddress, a call to glGetString(GL_EXTENSIONS) would have to 
>>> both return the results of a call to ctx.getSupportedExtensions and it 
>>> would have to enable every extension by calling ctx.getExtension and save 
>>> the returned interfaces somewhere. It would also have to do a lot of other 
>>> magic to convert the enums and functions of an extension to 
>>> storedInterface.anextension.enum and storedInterface.anextension.func 
>>> respectively.
>>>
>>> I do not know what Emscripten is doing but enabling all extensions seems 
>>> like unreasonable overhead for most apps as the number using all extensions 
>>> can probably be counted on the fingers of one hand. Providing an equivalent 
>>> to getExtension seems like a better idea, though I'm not sure how to 
>>> present that in c.
>>>  
>>> Regards
>>>
>>>     -Mark
>>> -- 
>>>  注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 
>>> 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます. 
>>>
>>> NOTE: This electronic mail message may contain confidential and 
>>> privileged information from HI Corporation. If you are not the intended 
>>> recipient, any disclosure, photocopying, distribution or use of the 
>>> contents of the received information is prohibited. If you have received 
>>> this e-mail in error, please notify the sender immediately and permanently 
>>> delete this message and all related copies. 
>>>  
>>> -- 
>>> 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] 
>>> <javascript:>.
>>> 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