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]. For more options, visit https://groups.google.com/d/optout.
