#directx FAQ
Frequently Asked Questions
Test
1. General DirectX development
1.1. How do I use the debug feature of the developer runtime?
The DirectX SDK comes with a great tool for finding bugs in your usage of the APIs - the Developer Runtime.
It can help you to find things like incorrectly passed parameters, bad usage patterns and even some performance problems.
It's installed by default along with the SDK, but to use it for debugging, you need to take a few steps.
1. Open the control panel and find the DirectX applet:
2. On the Direct3D tab, set the debug level slider to the rightmost setting - or the last step before that if you want to avoid some warnings. Also, enable the Debug radio button.
3. Now, compile your app in Debug mode, and use F5 to run it. The developer runtime will now start spewing information in the Visual Studio "Output" window. If you have any bugs or other problems related to D3D, they will show up here.
Some tips:
To Index1. Open the control panel and find the DirectX applet:
2. On the Direct3D tab, set the debug level slider to the rightmost setting - or the last step before that if you want to avoid some warnings. Also, enable the Debug radio button.
3. Now, compile your app in Debug mode, and use F5 to run it. The developer runtime will now start spewing information in the Visual Studio "Output" window. If you have any bugs or other problems related to D3D, they will show up here.
Some tips:
- If you use D3DX, make sure you link with "d3dx9d.lib" in debug mode, and "d3dx9.lib" in release mode. This ensures you get the maximum performance in release mode compiles, and that you get debug output when necessary.
- When your app is shut down, D3D will give you a list of unfreed memory - more exactly, D3D-related objects that you have not released properly. You can use the "lAllocID" values with the "Break on AllocID" box in the control panel to help find these leaks.
- "Maximum Validation" in the control panel applet may help you find more bugs.
- Having the Debug runtime enabled will lower the D3D performance, and may also make some DirectX applications misbehave. If you're testing performance or playing games, make sure to reset all settings to "Retail".
