DirectX Graphics Development with Visual Studio 2012

DirectX Graphics Development with Visual Studio 2012

Rate This
  • Comments 10

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. 

Getting Started

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.

Samples

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.

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.

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.

Videos

Feedback

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.

Updates

12 Nov 2012:  Added links to the Visual Studio 3D Starter Kit (download and Channel 9 video) and Build 2012 video.

  • Direct2D is based on DirectX, and WPF is based on DirectX, but you guys have never made them work well together, which is a crying shame.  The only way I can get my DirectX content onto my WPF application is by writing the DirectX content onto a GDI bitmap and then copying the pixels to an InteropBitmap that is the ImageSource for a WPF image.  This is extremely non-optimal.  What I really need is a way to combine immediate-mode DirectX graphics with WPF user interface.  

    This is of course for a Desktop application, you know, the kind you guys don't seem to care about anymore.

    Thanks,

    Eric

  • (same guy as last comment except I signed in)

    So what I really want is the sort of XAML + DirectX interop for desktop apps that you have created for Metro apps.

  • Does this fix the Visual Studio 2012 GUI?

  • I have to agree, the poor interop between D2D, WPF and newer D3D versions is really something that should be worked on. Right now, I don't know anyone that's using D3D professionally alongside D2D simply because running two devices creates more problems than being able to use D2D would solve.

  • Debugging graphics in VS 2012 requires Windows 8 lol. You guys are really good at marketing aren't  you? I have yet to see anyone who loves Windows 8, all of them are Windows 8 haters so am I. When will you guys make this feature available for Windows 7 users? let me guess, after all the marketing crap is complete. This is what happens when we stick with proprietary crap

  • @Asesh  The VS Graphics debugging tools can also be used on Windows 7.  This page on MSDN has more information on the supported platforms:  msdn.microsoft.com/.../hh315751.aspx

  • PLease seriously consider Eric's request - we are doing something similar and compositing drawn output into a WriteableBitmap just because we cannot use the same surface. Needless to say, performance is bad.

  • @Jennifer Leaf [MSFT]: Ok, I got it. It's the other GPU debugging feature that only supports Windows 8. Sorry for being rude as I was really mad cause that was one of the reasons for upgrading. When will you guys add more support for C++11? C++11 support in VC++ is really embarrassing

  • Speaking of embarassing... Please leave the youtube-quality comments in a more appropriate repository for them.  Topic: D3D debugging features; the comment? c++11. Niiiiiice.

  • Where is my last posting? Are critical comments not allowed?

    Eric: You are 100% right!

Page 1 of 1 (10 items)