Jump to content
  • Advertisement
Sign in to follow this  
ryan20fun

Tracking Down Rogue Textures [DX9]

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

Hi EveryBody.

i have just added fullscreen support to the simple game ive been working on.

i managed to get it to ALT-TAB out and reset the device correctly, so i solved it by doing a "dirty" hack( the graphics device releases all textes created by it )

the reason i say that is because i could release and recreate all but 2 Textures, i could not find the last two.

which brings me to the question, how to find them so i can reset them ?
will PIX help with that ?( ive tried using PIX once or twice but could never work out what to do with the data that was collected )

now about that "dirty" hack, wont that be a nifty option to include in my redering device ?( via a switch or something more explicit )
automatic asset resetting( when device lost ) / releaseing ( when device realesed )

Thanks In Advance.

Share this post


Link to post
Share on other sites
Advertisement

Just create them in the managed pool and you won't need to worry about this at all.


i will have a look at using the managed pool.
but i thought it would be a good idea to do some of the resource managment myself, even if it is just to understand how it is done etc.

Share this post


Link to post
Share on other sites
Managing it yourself can be educational for sure, but make sure that you read this first: http://legalizeadulthood.wordpress.com/2009/10/12/direct3d-programming-tip-9-use-the-managed-resource-pool/

Regarding the 2 extra textures, there are a few reasons why they may not Release. You may have called GetSurfaceLevel and not Released the surface when done, in which case the texture may also be held (I haven't tested this behaviour though). You may have one or both set as render targets at Release time. You may have some D3DX objects which create textures behind the scenes for you and not have called OnLostDevice on those objects.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!