Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static function linking #965

Closed
kvark opened this issue Dec 19, 2017 · 2 comments
Closed

Static function linking #965

kvark opened this issue Dec 19, 2017 · 2 comments

Comments

@kvark
Copy link
Contributor

kvark commented Dec 19, 2017

Here is an interesting piece of http://kripken.github.io/emscripten-site/docs/optimizing/Optimizing-WebGL.html#optimizing-load-times-and-other-best-practices:

Avoid using any of the *glGetProcAddress() API functions. Emscripten provides static linking to all of the GL API functions, even for all WebGL extensions. The *glGetProcAddress() API is only provided for compatibility to ease porting of existing code, but accessing WebGL via calling dynamically obtained function pointers is noticeably slower than direct function calls, due to extra function pointer security validation that dynamic dispatching has to do in asm.js/WebAssembly. Since Emscripten provides all of the GL entry points statically linked in, it is recommended to take advantage of this for best performance.

Is there a way to link all GL functions statically as opposed to get_proc_address?

@kvark
Copy link
Contributor Author

kvark commented Dec 19, 2017

Relevant - emscripten-core/emscripten#5951

@kchibisov
Copy link
Member

We don't have emscripten for a long time iirc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants