Skip to content

Make gl3wProcs thread-local in C11 version #62

@ikskuh

Description

@ikskuh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions