View Full Version : "Please Wait" screens
I just wondered if anyone could point me in the direction of any demos which show how to have a "Please Wait While Rendering" progress bar appear at the start of your app. I have been told that this is usually done using 'Windows Programming'.
Thanks in advance. http://www.opengl.org/discussion_boards/ubb/smile.gif
[This message has been edited by Gus (edited 03-29-2001).]
03-29-2001, 05:09 AM
This is one of them crazy questions..
You want to know how to show a windows gdi bar or do you want to render it with opengl?
Move to google.com and search on "windows programming"
Due to the nature of this discussion forum, I would have thought most readers would have assumed the latter... quite obviously not!
What exactly do you mean by "Please Wait for Rendering"? What exactly are you doing? You need to put a render loop inside your rendering loop. The inner render loop will keep track of percentage and update a graphical representation (A 2d bar?). The outer rendering loop does whatever work you need done you called it "rendering".
ok, you seemed not to have understood me very well. Nevertheless, your advice... was greatly appreciated. To clear up anything misunderstood, the term 'rendering' in this context was referred to the period of time when the scene objects are compiled into mem from various sources (display lists etc). Okay, it is not true 'rendering' but then what would you call it? Either way, the pedantic nature of this is not important.
03-29-2001, 12:34 PM
Regardless, you need to set up some sort of counter that gets incremented at a regular interval within whatever loop you are running. Drawing it in GL is then just a matter of computing the length of the bar based on that number and the maximum that it will reach.
03-29-2001, 10:05 PM
Hmm, at first I was thinking that he meant how do you have a animation/progress bar playing while loading in the data...
03-30-2001, 12:47 AM
Well, if you can compile a displaylist, showing a 2D bar in OpenGL should be a breeze! http://www.opengl.org/discussion_boards/ubb/smile.gif
Load texture or whatever
Or do you want to update the bar during the list is compiling or during whatever?. That would be trickier, but since compiling a list takes a fraction of a second (well, usually I guess), it would serve no point.
Thanks for your reply once again. I see what you mean about compile list...update progress bar etc but the problem I am having as you anticipated is updating the progress bar whilst each list is actually compiling. I have 50+ lists in my app, each one containing an avg 10k mesh points. When running something like this on a low spec machine, the time taken for the lists to be compiled, sometimes leads the user to believe that the app has crashed. The real problem I am having is actually flushing the buffer to the screen, whilst the lists are still being compiled....
03-30-2001, 05:48 AM
I'm pretty sure that that's not possible, at least not using OpenGL. Once you go into GL_COMPILE, all of the GL commands are going into the DL (well, those that can, anyway). You will probably need to use something else to draw the progress indicator.
Make a second thread that runs a second OpenGL context to display the progress bar. Your primary thread will compile the list and update the counter that is used by the secondary thread (progress thread).
Have fun!! http://www.opengl.org/discussion_boards/ubb/smile.gif
Good suggestion..... I'll give it a go.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.