In an attempt to create a loading bar for an game,
I wanted to use a multithreaded approach.
One thread shows a loading screen and runs the main application event loop
while a new thread silently loads all the Sprites in the background
and then adds them to a layer.
The problem I’m facing is that any OpenGL calls in the new thread die with a BUS ERROR or memory access error of some sort.
I’m assuming this is because both threads are attempting to make OpenGL calls at the same time or the new thread is unaware of the OpenGL context.
What has to be done to allow multiple threads to make OpenGL calls