   Loading textures, model files etc..
  Hi all.I usually code openGL demos by loading all required stuff at the start of the program. But this way of doing things start to get bad when I am coding something bigger, like a game for example.As the program is loading files or textures, you do not have control of the program. So the OS would probably say that your program is not responding.I was wondering how do game programmers make the "Now Loading" screen, rendering something onscreen and loading files and textures in the background.I thought of using threading to manage this. However I've read that you cannot call gl functions from 2 different threads.Any experts care to share some tips? Or guide me? Thanks in advance!   
  I've seen professional games that use a single thread to load resources so it is not a big deal.You can of course load resources with a second thread. When I say load, I mean load from disk and use the CPU to decompress your png file or whatever file. Do not make any GL calls in the second thread. Use thread 2 to signal the primary thread that it needs to call glTexImage2D or glBufferData or whatever.   ;  A single-threaded solution would be to first load some essential display files (like a loading bar or fonts or something), then load the rest of the required files in a loop; in each loop iteration, you would update the screen after loading a single file (for example advancing a loading bar, etc).Probably most games do this; it seems kind of a waste of effort to multithread this. In some games (Doom 3 and Quake 3 come to mind all though they are somewhat old), you see the fps dropping to 1-2 in the loading screens so it seems like they do this too.Finally, the "not responding" message is heuristic... if a program loops for a certain number of times it will display this. It's provably undecidable whether a program will halt or not. So don't worry about that :P.   