DirectX Graphics Development with Visual Studio 2012
Visual Studio 2012 includes several new features for developing and debugging applications that use DirectX. Here are links to references and resources so you can get started with these new features.
You can write and build apps that use DirectX with Visual Studio Express 2012 for Windows 8 or Visual Studio Express 2012 for Windows Desktop, or any of the retail versions of Visual Studio 2012 (Professional, Premium, and Ultimate). You also don’t need a separate DirectX SDK download – the DirectX SDK is now part of the Windows SDK, and the Windows 8 SDK is included in Visual Studio 2012.
You do need a retail version of Visual Studio 2012 to use the Visual Studio Graphics Debugging and Graphics Asset tools described later in this post.
If you have projects that were using the DirectX SDK, check out “Where is the DirectX SDK?” to learn how to use these projects with Visual Studio 2012.
There are many DirectX samples on the MSDN Samples Gallery, for both Windows Store and desktop apps. You can also search for and download samples directly from the New Project window in Visual Studio 2012.
Also check out the Visual Studio 3D Starter Kit sample, which is a great way to get started with the basic steps of creating games such as loading textures and models, working with a camera and 3D scene, and using XAML and DirectX together.
Resources for using DirectX in Windows Store Apps
Not only does Visual Studio include the same DirectX support for the new Windows Store apps as it does for desktop apps, you can also combine XAML and DirectX in the same Windows Store app.
- Introduction to 3D Graphics with DirectX (focused on Windows Store apps)
- List of resources for developing Windows Store apps using DirectX and C++
- Walkthrough of the MarbleMaze sample
- DirectX and XAML interop
- Combining XAML and DirectX
Compiling and using HLSL files
Visual Studio now includes support for HLSL files in the IDE, including syntax coloring, indenting, and outlining. We also support using the HLSL compiler (FXC.exe) with MSBuild so you can easily compile your HLSL files into .cso (compiled shader output) format. You can configure the compiler settings on a per-file basis through Property Pages.
Visual Studio DirectX Graphics Diagnostics
The DirectX Graphics Diagnostics tools help you diagnose and debug DirectX rendering issues by analyzing frames captured into a log file. These tools integrate some of the functionality from the PIX for Windows tool that was part of the DirectX SDK. To debug apps running on tablets or other devices which don’t have Visual Studio installed, you can capture frames programmatically and then open the logs in Visual Studio to debug after the fact.
- Overview of DirectX Graphics Diagnostics tools
- Walkthrough from Visual C++ team blog
- Walkthroughs of various debugging tools from MSDN
- Graphics Log Window
- Graphics Event List
- Graphics Pipeline Stages
- Graphics Event Call Stack
- Graphics Pixel History
- Graphics Object Table
- HLSL Debugging
- Capturing Graphics Information Programmatically
Tools for Graphics Assets
As a developer, wouldn’t it be great to look at graphics assets such as textures or 3D models without needing to compile them into your game or app and run it? Or to see the textures or models while you’re using the Graphics Diagnostics tools to visually understand what’s being (or not being) rendered? Visual Studio 2012 includes tools that allow you to view graphics assets directly from the IDE. You can also use the Shader Designer to create shaders using a visual tool, so you can visualize what the shader will do as you’re designing it.
- Overview of Graphics Asset tools
- Working with Textures and Images
- Image Editor Examples
- Working with 3D Models
- Model Viewer Examples
- Working with Shaders
- Shader Designer Examples
- Build 2012: DirectX Graphics Development with Visual Studio 2012
- Channel 9: Visual Studio 3D StarterKit
- Creating Windows Store apps using C++ and DirectX
- Channel 9: Visual Studio 11 Developer Preview: DirectX 11 Development Experience
- Bytes by MSDN: Jim Griesmer and Jerry Nixon discuss Visual Studio Graphics & Tools for Game Developers
- Bytes by MSDN: Rich Chiodo and Jerry Nixon discuss Visual Studio tools for Debugging Graphics
- Bytes by MSDN: Boris Jabes and Jerry Nixon discuss New Visual Studio 11 Improvements
- GDC 2012: Visual Studio 11 for Game Developers
- BUILD 2011: A lap around DirectX game development tools
We would love to hear from you about the graphics tools in Visual Studio! To report bugs, please use the Visual Studio Connect site. The Visual Studio UserVoice site is the best place to submit suggestions and ideas for future releases.
Still more that you want to know? Leave us feedback in the comments.
12 Nov 2012: Added links to the Visual Studio 3D Starter Kit (download and Channel 9 video) and Build 2012 video.