• Advertisement
Sign in to follow this  

DirectX: D3DXComputeTangentFrameEx

This topic is 3344 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
Yes that would be logic, but I don't understand how I get that memory leak after using that function :-/

Share this post


Link to post
Share on other sites
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