Sign in to follow this  
AntiGuy

Preloading images.

Recommended Posts

AntiGuy    267
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
serratemplar    1656
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
slymr    193
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this