Jump to content
  • Advertisement
Sign in to follow this  
Pauluss86

Some textures disappear (weird)

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

Hey all! First post here for me but i've been reading this forum for years now :) I've got a strange problem with a little project i'm working on. First, my app runs smooth and without any issues. However, after working on it for some time (and thus recompiling and running the program a lot) half of my textures suddenly disappear :/ First I thought it had something to do with video memory, I use a handful of 1024x1024 textures, and me not unloading my resources properly on shutdown. However I think they are released like they should and I don't get an OutOfVideoMemory error when the magical disappearing starts to happen. The only solution I found thus far is rebooting, and because this issue only arises after a few hours and tens of runs it's not really bothering me, just annoying. Anyone any ideas about solving this problem? Help would be greatly appreciated! -Paulus Btw. I use Visual C# 2005 Express, DirectX 9 and 1 HLSL shader that uses a total of 32.5MB of textures for rendering one 60.000~ poly model. I release all the textures, the shader, the mesh and the D3D itself on shutdown using the xxx.Dispose() method. Oh, before I forget: ATi Radeon 9600SE, drivers up to date ;)

Share this post


Link to post
Share on other sites
Advertisement
I'm not a C# programmer but I'm a Java and DirectX C++ programmer then I'll try :) ... After call Dispose() set the object to null (texture.Dispose(); texture = null;). Not sure if it will work. Sorry =P

Share this post


Link to post
Share on other sites
You could try running the DX binaries in debug mode. Look for the file called dxcpl.exe in your SDK and make a shortcut to it on your desktop. It's very handy. You also have to right click your solution and enable "unmanaged code debugging" under the debug tab. Next you could output the amount of Texture memory you have available in your renderloop (m_device.AvailableTextureMemory / 1024 / 1024).ToString() so you can see how much you have available.

Hang on your using 2005 Express, I don't think you can debug unmanaged code in that. Perhaps you could download DebugView from Sysinernals to get the debug output. I'm not entirely sure.

Share this post


Link to post
Share on other sites
@Headkaze
xissburg! I think it works, however i've not been programming a lot the last few days but i think i'm in the clear.

@Headkaze
why didn't i think of m_device.AvailableTextureMemory :p. I don't think i need it for this issue anymore but I implemented it anyway to prevent any possible future problems.

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!