Jump to content
  • Advertisement
Sign in to follow this  
sormjs

Reloading Textures

This topic is 3790 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 have an application where the resolution of my render window can be changed. To resize my render window I need to re-initialize the D3DDevice which in turn requires me to re-load all my textures. I was wondering if anyone knew a good way to do this. For instance, since I have already loaded the textures into memory, is there a way that I can grab them from memory instead of having to load them from the disk again? Thanks in advance sormjs

Share this post


Link to post
Share on other sites
Advertisement
Well, as Dave stated you could do a Reset(display_parameters) call, but make sure you call
Quote:

OnDeviceLoss() to release the resource before the device reset
OnDeviceReset() to recreate the resource after the device reset

for the proper resources, or it will cause your game to crash.

Best of luck.

Share this post


Link to post
Share on other sites
Quote:
Original post by sormjs
I have an application where the resolution of my render window can be changed. To resize my render window I need to re-initialize the D3DDevice which in turn requires me to re-load all my textures. I was wondering if anyone knew a good way to do this. For instance, since I have already loaded the textures into memory, is there a way that I can grab them from memory instead of having to load them from the disk again?

Thanks in advance
sormjs


You're not putting *all* of your textures into D3DPOOL_DEFAULT, are you?

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!