I am currently working on some code which should show something on the screen (animated) while resources are loaded.
To have a clear animation which is not interrupted by loading resources (which might take some ms per resource) I do one of the two tasks in a separate thread.
Now I'd like to know how I should manage it. I tried to let the main program create the window, start the thread and load resources whereas the thread draws a sprite on the screen, but I get some OpenGL error in the console:
An internal OpenGL call failed in Drawable.cpp (399) : GL_INVALID_OPERATION, the specefied operation is not allowed in the current state
I suggest I must draw in the same thread where I created the window, but the same thread must be responsible on loading images I suggest...
Any solutions / tips on this?