gl3w
gl3w copied to clipboard
Make gl3wProcs thread-local in C11 version
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