Sign in to follow this  
Shadowwoelf

Texture loading

Recommended Posts

I was simply wondering what is the best way to load multiple textures at run time. This is what I was considering doing enum gamestate; bool change=false; so when anything changes the gamestate it turns change=true; if(change==true){ unload current textures check what the new gamestate textures need load the new textures change=false; } or should i do this another way?

Share this post


Link to post
Share on other sites
First, you should profile the time taken for loading the required amount of textures.

If you can load the required amount of textures in an instant (I would say in less than a second or two), and you want the easiest solution, then you probably already found it yourself.
If you have a large amount of textures that take a while to load, you might want to consider other and more complex features such as a loading screen (possibly with some sort of a progress bar to be more user-friendly) and/or preloading, background-loading, and caching of textures and other in-game data (perhaps in terms of a typical resource manager).

Share this post


Link to post
Share on other sites
Lots and lots. Most will be available by a search either here or on Gamasutra.
But you probably do not need a more complex algorithm, assuming you have a small game in progress.

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