I understand there's issues with OpenGL and Multithreading, but what I want to do seems so simple that I feel like there MUST be a simple way to do it.
Here's what I do:
1. My game starts, and loads up some loader display graphics immediately, in main thread.
2. A thread is started to load a bunch of graphics. None of these graphics will be displayed at any point during all of this.
3. BUT: OpenGL renders the loader graphics (along with a progress bar) in main thread.
Special notes: ALL rendering is done in the main thread. The secondary thread is *only* to load bitmaps and push them onto OpenGL textures.
This works flawlessly on Win32 using DirectX. But using OpenGL, I get a crash. I've been googling for any information about how to make OpenGL handle this, but everyone seems to be addressing problems much more complex than mine-- that is, OpenGL trying to render/show from multiple threads.
I don't want to do that-- all I want to load is load textures (and bind them) in a seperate thread, with the program aware that it can't render any of these until the thread completes.
But surely there's a way for me to do this using OpenGL, right? Note that I am using SDL in my mac port, so the OpenGL subset might be a little different. But this is a such a basic and necessary task that I can't imagine it not being possible and easy... right?
Thanks in advance!