• Advertisement

Archived

This topic is now archived and is closed to further replies.

Loading Screens

This topic is 5774 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
It's pretty easy to do :

- setup and ortho screen and render two quad's
- quad one is textured with the background image (this quad is as big as the screen)
- quad two is textured with the image of the progress bar
- quad two's width is 0 at the beginning and while stuff get's loaded you let it get bigger.
- adding the percentage meter is just rendering text to the screen.

[edited by - George2 on June 30, 2002 3:58:56 PM]

Share this post


Link to post
Share on other sites
yes true, but i didnt quite word that right... i meant too add not just loading screens but like loading in general... like what would be the best way to go about this...

right now i use a system based off integers that let the program know what it should be rendering... im hoping theres some resources on advanced scene loading...

heres an example of how im doing multiple scene loading now...

create an int on application start up with value of 1,
then where i render scenes i have tidbits like this...

if(Status==1) //App just started, bring up main menu.
{
mainmenu();
//then in main menu when an item is selected it changes Status
}

if (Status==2) //they selected option one...
{
RenderOption1();
//now since status = 2 we no longer render main menu and now render Option 1.
}

and so on... please tell me theres a much better way of doing this...

how would tell if somthing is currently being loaded...
like say i have a function that textures a basic quad with a bitmap named LoadBMP()... now lets pretend it actually takes longer than a nano second to do this would i just see if its currently being loaded by doing...

if (LoadBMP)
{
//loading screen code here
}

or is there a dif way to tell if somthing currently being loaded... and if so where can i find good resources on this... not necesarily a full working source code example... but like an explenation and maybe key bits of code so i can learn it well...

its kinda funny, i been working with OpenGL a while, but never really tried stuff like this... well we all gotta learn it some time =)

any help is greatly appreciated... feel free to make fun of my current way of loading scenes =)

Share this post


Link to post
Share on other sites
Well, in smaller applications, everything is loaded before the rendering is done. In bigger apps, it may not be wise to load everything, especially if you won''t need them right away (it may take too long, and there may not be enough memory).

As for telling if something is being loaded, look through you code. Whenever you load something, put a loading screen in there. Start the screen before you load it, and then get rid of it after you load it. For example:

RenderLoadScreen(0%);
LoadBMP("font.bmp");
RenderLoadScreen(25%);
LoadBMP("title.bmp");
RenderLoadScreen(50%);
LoadBMP("bkgd.bmp");
RenderLoadScreen(75%);
SetUpProjection();
RenderLoadScreen(100%);


That, of course, is sem-psuedocode.

Share this post


Link to post
Share on other sites
oh ok, that makes complete sense, thank you.

as for how im using integers to tell what scene to load... is there a better way? or am i doing it how its supposed to be done...

Share this post


Link to post
Share on other sites
It is really up to you, and what is easiest for you to program. Integers are a fine way to do, and you could even use boolean values (if there are only a few options). How many scenes are you planning on having? If you are going to have more than 3 or 4, get rid of the IF statements and use a switch statement. It will be more compact and probably a little easier to read.

Share this post


Link to post
Share on other sites
Thank you guys for all the help...

Also, this doesnt relate to Loading screens but i dont want to clutter the forum with too many posts...

In your opinion, what is the best Winsock book out there, the only ones i could find in local book stored were for java, and theres not many good tutorials on the internet about winsock in general, they are all geared towards a specific type of application... so im going to order a book once i get some feedback because i have spent my fair share in money on books that ended up being crap =)

Share this post


Link to post
Share on other sites

  • Advertisement