Graphics Reference
In-Depth Information
F Tracking resources: Direct3D resource leaks are another area that can take some
tracking down, especially in complicated scenes. SharpDX allows you to enable object
tracking that you can query at any time to retrieve a list of Direct3D objects that
have not been released along with their creation stack trace. On application exit, a
complete list of any unreleased objects is printed to the debug output. Enabling the
debug layer and the object tracking takes a toll on performance and should only be
enabled as needed rather than always enabled during development.
F Debugging a pixel: Finally there is per-pixel output and shader debugging.
Traditionally the DirectX SDK PIX tool has been used for recording Direct3D API calls,
now with the Windows 8 SDK and Visual Studio 2012 you can use the Graphics
Debugger. When active, this debugger allows you to capture frames that can then be
analyzed. You can determine what has impacted an individual pixel, including support
for stepping through shaders.
Getting ready
Before we can debug our Direct3D application, we need to prepare the project settings with
the following steps:
1.
Create a new Windows Form Application named Ch01_03Debugging in our
D3DRendering.sln solution. Set this new project as the startup project.
2.
To support the Visual Studio 2012 Graphics Debugger and to allow native debug
messages from Direct3D to appear in the debugger output window, we must first
enable native code debugging for the project. To do this, right-click on the project in
the solution explorer and click on Properties, now click on the Debug settings and
check Enable native code debugging.
Enabling native code debugging
 
Search WWH ::




Custom Search