8000 Make gl3wProcs thread-local in C11 version · Issue #62 · skaslev/gl3w · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make gl3wProcs thread-local in C11 version #62

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

Open
ikskuh opened this issue Jan 20, 2019 · 0 comments
Open

Make gl3wProcs thread-local in C11 version #62

ikskuh opened this issue Jan 20, 2019 · 0 comments

Comments

@
64B7
ikskuh
Copy link
ikskuh commented Jan 20, 2019

Hey!

I'm building a multi-threaded OpenGL application and require gl3wProcs to be thread local storage (so i can use multiple contexts with each their own function pointers).

I don't have a patch, but the only thing that must be changed is two lines of code:

// gl3w.h:
extern _Thread_local union GL3WProcs gl3wProcs; // added _Thread_local here

// gl3w.c:
_Thread_local union GL3WProcs gl3wProcs; // added _Thread_local here

This feature could also be optional with a preprocessor option GL3W_THREAD_LOCAL or similar...

Regards
Felix

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

No branches or pull requests

1 participant
0