   real loading screens??
  Hi!How to implement real loading progress bar when I change a level? Everybody knows that, to render something must execute the "render loop"... So, how to load textures etc, and render in the same time??TIA! 
  You could have a showLoadScreen funtion that ran in a thread with a global percentLoaded variable that gets updated by your loader.  The thread just continuously loops and draws the screen showing some visualization of the percentLoaded.  When the loading is done, killThread.  That''s just one way. ;quote:Original post by dev3D  to render something must execute the "render loop"...Actually, I don''t believe that''s true.You only need to render/flip buffers on the screen when what''s on the screen has changed.So, you could probably do this:Loop while (there are still resources to load) Render the loading screen Flip buffers Load the next resource Update the percentage loadedEnd loopIt''ll move in bursts, at the end of each resource being loaded, but it should still give players an idea of how much is loaded.Threads are a nicer idea in the long run though. ;  Theres awlays a call back.Have a small fucntion like such.void UpdateDisplay(int pos, int max){   float ratio = (float)pos/max;   int pixelsUsed = ratio*MAX_PIXELS_IN_PROG_BAR;   //render bar   //flip screen   }  Then pass this to your loading function. like sotypedef void(*DispFunc)(int, int);int LoadLevel(char * MapName, DispFunc CallBack){   CallBack(0,100);   //load level   //every so often   //dosomthing like CallBack(5,100);   CallBack(100,100);}  This is just an idea. There are many things you can do like this. Armand -------------------------It is a good day to code. ;  To add to what superpig said, make sure you process window messages though if you''re running in windowed mode. This doesn''t have to be done in threads either. Just process messages before loading each resource and that should be enough. I hope that makes sense. ;  I have forgot to mention, the engine is OO, so i can call flip by my self, it''s called somewhere else in engine, all i can do is to render in the render loop! So, that is the problem. Of course, with flippinf when you need can''t be any problems with progress bar, but this is another thing.TIA! ;quote:Original post by dev3D  I have forgot to mention, the engine is OO, so i can call flip by my self, it''s called somewhere else in engine, all i can do is to render in the render loop! So, that is the problem. Of course, with flippinf when you need can''t be any problems with progress bar, but this is another thing.TIA!   In that case, the engine should provide the loading screen functionality. ;  Well, i can add this in engine! Shall i open a new thread to specifi OO loading screen? ;  if you want to provide the ''loading screen'' functionality in your engine then you need to design your engine thusly, dont try and ''bolt it on'' later by crowbaring it in ;  Crowbar/ predesigned he still dosnt know how to do it.One possibility is 2 threads, like mentioned get your loading and rendering on seperate threads.If you want smooth animation then just make its so your loading functions return after a certain amount is loaded like this int Load(char *file, int seed){   if(seed == 0)   {   //load stuff   return 1;   }   else if(seed == 1)   {   //load MORE stuff   return 2;   }   else if(seed == 2)   {   //load MORE stuff   return -1; //done   }}int status = 0;void Loop(){  status = Load("sdfsf", status);  //render}   Thats how id do it.edit: of corse you would class up the load function so your not opening and closing the file every time its called.    [edited by - honayboyz on February 10, 2004 10:36:53 PM]