Skip to main content
GameDev.net gamedev.net
🔒 Locked

Reloading Textures

Started by sormjs Mar 6, 2008 at 3:51 PM 2 replies 550+ views
Original Post
sormjs
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
dave
dave
This might help.
QuinnJohns
QuinnJohns
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.
[size="2"][size="1"][size="2"]- Quinn
[size="2"][size="1"][size="2"]Software Developer, Mintrus
MJP
MJP
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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.