• Advertisement
Sign in to follow this  

Texture loading

This topic is 3521 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 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
Advertisement
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
Sign in to follow this  

  • Advertisement