Jump to content
  • Advertisement
Sign in to follow this  
Kitasia

Preloading images.

This topic is 4234 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

I was wondering, is there anyway to preload images? I'm using VC8 if that helps any. It takes a while if I load a bunch of images and bind them to textures (OpenGL) at once when I start debugging. I'm thinking as an alternative I should load images in groups as they're called for but I just want to make sure. Thanks in advance! EDIT: Oh yeah, as a reference I loaded 50 570x530 png images as a test and that took around 15 secs.

Share this post


Link to post
Share on other sites
Advertisement
Stowing your images (and possibly other data) into resource files can help with that a bit. (Think WAD files from Doom.) Say sets of your images are stored contiguously in your resource file. Load the file, splitting the images up and stickin them into memory where you can get at them faster. So that's one loading sequence, instead of openning each image file individually you're only openning that one (or perhaps several files for many many images). So, preloading images (or any game data) happens all the time =)

That's where creative and corny loading screens come into play! Can *you* preload? Sure!

I hope this gets your gears turning; post any questions you may have =)

EDIT: Here's the article on this site that taught me about this stuff...
Resource Files Explained

Share this post


Link to post
Share on other sites
I recommend loading textures in the background. Have one thread responding to the player as expected and another thread loading a image.

Also, I agree with serratemplar to an extent. Save the images in groups though. Have one group which is menus. Another which is in-game play. etc.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!