Members - Reputation: 2076
Posted 27 November 2001 - 03:23 PM
That said, I think you''d need to have a "global" store of data/memory in which you create the textures. Realize, though, that you''ll then need to synchronize access using mutexes and all those other lovely multithreading issues.
Other than that, I can offer no specifics. Sorry, hope I helped.
Members - Reputation: 122
Posted 27 November 2001 - 04:12 PM
The problem is that I have a thread dedicated to recving network packets, and in that thread I call a function that loads game data. Now it appears glTexImage2D() does not put the texture in a "global" store and is only local to my worker thread.
Im pretty sure there is a way to tell OpenGL to stick the texture in a "global" store, but as you said I would have to open up a whole new can of worms.
So what Im planning to do is just throw a flag in the worker thread that signals the main thread to load the stuff in there.
Moderators - Reputation: 10003
Posted 27 November 2001 - 11:57 PM
As you say, best way it so tell the main thread to do it instead.