SDL Forum Index
SDL
Simple DirectMedia Layer Forums
Reply to topic
DX9 device lost -> SDL_TEXTUREACCESS_TARGET lost. Cleanu
treefitty


Joined: 09 Jan 2017
Posts: 1
Reply with quote
Hello,

Developing a 2D game using SDL2.0 and testing on an older system (XP SP3 actually, to ensure it works fine on older systems) and I've hit the DX9 device lost issue where rendered textures turn into garbage(?) data. (Alt-Enter, screensaver, Windows Key+L, opening a different program in fullscreen, etc)

I've already read a lot of threads about this and found that SDL now sends the event SDL_RENDER_TARGETS_RESET, which is great. So I'm listening for the event and I can tell the program to rebuild the textures when the device is lost. My actual question is somewhat more trivial:

Do I need to do any cleanup on the SDL_Texture when this happens? If I just tell the program to rebuild all of its rendered textures at the same locations/pointers where they were previously, am I leaking memory because I didn't free up the old SDL textures, from before when the device wasn't lost?

I'm not a graphics programmer so I haven't much idea what's going on behind the scenes regarding texture memory and devices etc. Thanks.
View user's profileSend private message
DX9 device lost -> SDL_TEXTUREACCESS_TARGET lost. Cleanu
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic