Jump to content
  • Advertisement
Sign in to follow this  
Cleese852

DirectX: D3DXComputeTangentFrameEx

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

Hellow, I am making a terrain and I need to generate the normal, binormal and tangent for the normal mapping to work. But when I shut down my program I have a memory leak which has to be caused by D3DXComputeTangentFrameEx. If I put the 'D3DXComputeTangentFrameEx'-method in comment I no longer have the leak. So why do I get this when using D3DXComputeTangentFrameEx to generate the normals etc. ? This is the debug output I get: D3DX: MEMORY LEAKS DETECTED: 2 allocations unfreed (131712 bytes) D3DX: Set HKLM\Software\Microsoft\Direct3D\D3DXBreakOnAllocId=0x94f to debug Cheers

Share this post


Link to post
Share on other sites
Advertisement
Are you providing the same ID3DXMesh* pointer as both the input and the output? This function creates a new mesh that is a clone of the input mesh, so if you use the same pointer you'll never Release the original mesh (which will cause a leak).

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!