Sign in to follow this  

Reloading Textures

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

This topic is 3573 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.

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