Debugging

Debugging a Direct3D application can be challenging. In addition to checking all the return values (a particularly important piece of advice in Direct3D programming, which is so dependent on very different hardware implementations), try the following techniques:

·Switch to debug DLLs.

·Force a software-only device, turning off hardware acceleration even when it is available.

·Force surfaces into system memory.

·Create an option to run in a window, so that you can use an integrated debugger.

The second and third options in the preceding list can help you avoid the Win16 lock which can otherwise cause your debugger to hang.

Also, try adding the following entries to WIN.INI:

[Direct3D]

debug=3

[DirectDraw]

debug=3