--
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 emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 <alon...@gmail.com>:
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 <juj...@gmail.com> 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 <robert.g...@gmail.com>:
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_buffersAlso 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 emscripten-discuss+unsub...@googlegroups.com.
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 emscripten-discuss+unsub...@googlegroups.com.
--
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 emscripten-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscribe@googlegroups.com.
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 emscripten-discuss+unsubscribe@googlegroups.com.
--
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 emscripten-discuss+unsubscribe@googlegroups.com.
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 emscripten-disc...@googlegroups.com.
Oh, so in normal non-WebGL GL, there isn't a method to enable an extension?
Correct.
They are all enabled by default?
Yes.
Then yes, it sounds like we need to add an option to enable an extension, emscripten_enable_webgl_ext(const char*) or such. I'm surprised we didn't run into this before. I think emscripten might already be enabling some extensions by default, that sounds familiar.
Yes I think this option is needed.
In native OpenGL {,ES} the tokens are all defined in the .h files
so can be used in code without any additional checks. Function
pointers are also defined. To use an extension that does not add
any functions, the application simply uses it, preferably checking
for its existence first. For extensions that add functions, the
app queries the function pointer values setting those into the
existence function pointer variables.
In WebGL a call to getExtension, which is defined as
"object? getExtension(DOMString name", returns an object which
contains any constants or functions defined by the extension. This
has to be reconciled with the native OpenGL way of doing things.
--
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 emscripten-disc...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.