It is supported by my browser. So basically I can just call glDrawBuffers 
and it should just work? Thank you.

On Sunday, August 24, 2014 1:46:17 PM UTC-4, jj wrote:
>
> In Emscripten glDrawBuffers is just glDrawBuffers. To query if that 
> extension is supported, look for the string "WEBGL_draw_buffers" in 
> glGetString(GL_EXTENSIONS);, e.g.
>
> if (strstr(glGetString(GL_EXTENSIONS), "WEBGL_draw_buffers"))
> {
>    printf("WEBGL_draw_buffers is supported!\n");
>    glDrawBuffers(...); // Now safe to call WEBGL_draw_buffers since we 
> know it is supported.
> }
>
>
>
> 2014-08-24 20:34 GMT+03:00 Robert Goulet <[email protected] 
> <javascript:>>:
>
>> Yes perhaps you are right. If I use glDrawBuffers directly, it seems to 
>> work (no GL error reported), however glDrawBuffers is not supported by 
>> WebGL 1.0 specs. To use it, one must query for the extension 
>> WEBGL_draw_buffers.
>>
>> So then I am wondering, what does Emscripten glDrawBuffers map to?
>>
>> On Sunday, August 24, 2014 1:22:14 PM UTC-4, jj wrote:
>>
>>> Oh wait, actually that sounds odd like Alon mentions: Are you calling 
>>> getProcAddress with the name of an extension? That's unexpected, it's only 
>>> supposed to be used for function names that an extension supports. Does 
>>> glfwGetProcAddress("glDrawBuffers") work?
>>>
>>>
>>> 2014-08-24 20:07 GMT+03:00 Alon Zakai <[email protected]>:
>>>
>>>>  Hmm, looks like we don't support any extensions in our getProcAddress 
>>>> code. It just supports functions. Should it support extensions? I'm not 
>>>> sure which docs to read regarding that.
>>>>
>>>> - Alon
>>>>
>>>>
>>>>
>>>> On Sun, Aug 24, 2014 at 9:46 AM, Jukka Jylänki <[email protected]> 
>>>> wrote:
>>>>
>>>>> In Emscripten you have all the GL functions for core spec and 
>>>>> extensions available already statically at compile-time without having to 
>>>>> obtain function pointers. Calling the functions without obtaining 
>>>>> pointers 
>>>>> is preferred, since it gives better performance and is generally also 
>>>>> simpler.
>>>>>
>>>>> If you still want to call the function by querying the pointers e.g. 
>>>>> in order to have a symmetric code path for both native and Emscripten, 
>>>>> you 
>>>>> should be able to. Perhaps we are missing support for that 
>>>>> function/extension in glfwGetProcAddress? Try checking the 
>>>>> src/library_gl.js and src/library_glfw.js on how they go through the 
>>>>> route 
>>>>> to obtain the function pointers to see what might be off there.
>>>>>
>>>>>
>>>>> 2014-08-24 19:39 GMT+03:00 Robert Goulet <[email protected]>:
>>>>>
>>>>> Hello,
>>>>>>
>>>>>> I am trying to get a WebGL extension, namely WEBGL_draw_buffers, 
>>>>>> using glfwGetProcAddress and it always return nullptr. When I list 
>>>>>> all the available extensions of my browser I clearly see that 
>>>>>> WEBGL_draw_buffers is listed, and I am even able to run a demo on a 
>>>>>> web page that make use of it. So why glfwGetProcAddress always 
>>>>>> returns nullptr when used with Emscripten? Is this supposed to work?
>>>>>>
>>>>>> Chrome JS console output this error:
>>>>>> bad name in getProcAddress: WEBGL_draw_buffers | WEBGL_draw_buffers
>>>>>>
>>>>>> Also I am not sure if this is needed, but I made sure WebGL draft 
>>>>>> extensions are enabled in Chrome.
>>>>>>
>>>>>> Or maybe glDrawBuffers is already mapped to WEBGL_draw_buffers when 
>>>>>> used in Emscripten? Can anyone confirm/deny this?
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>>> -- 
>>>>>> 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.
>>>>>
>>>>
>>>>  -- 
>>>> 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] <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