Technical tips, tricks, and news about game development for Microsoft platforms including desktop, Xbox One, and UWP
The Windows 10 May 2019 Update (a.k.a. Version 1903) has been deployed to insiders and
will be deployed publicly in late May is being deployed publicly on May 21st, but in the meantime the matching Windows 10 SDK (10.0.18362) is available now. See this blog post for details on the ‘go-live’ plan.
Visual Studio 2019 RTM is now available for download, including the updated Community edition. The VS 2019 RTM Redistribution packages are also available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more information see the Visual Studio Team blog.
Sorry for having been quiet for so long. In addition to the usual holiday lull, I’ve also been working on migrating this blog to GitHub Pages which has necessitated a lot of manual cleanup and formatting moving from WordPress to Markdown. In any case, the new location for the Games for Windows and DirectX SDK blog is now: https://walbourn.github.io/. The new site has the entire archive by month and tag.
The ARM64 platform supports ARM-NEON using the same intrinsics as the ARM (32-bit) platform. The Windows on ARM (32-bit) platform assumes support for ARMv7, ARM-NEON, and VFPv3. The Windows on ARM (64-bit) platform assumes support for ARMv8, ARM-NEON, and VFPv4.
Visual Studio 2017 (15.9 update) is now available for download, and you should see the ‘new update available’ notification in the coming weeks–you can also get the update now by downloading the ‘free trial’ version of the installer which will let you update your system. This release includes support build ARM64 UWP apps and C++17
<charconv> for float.
DirectXMath version 3.13 is now available on NuGet and GitHub. It is included in the Windows October 2018 Update SDK (17763), which jumps from version 3.11 which shipped in both the Windows 10 Fall Creators Update SDK (16299) and the Windows 10 April 2018 Update SDK (17134). Basically, I missed getting DirectXMath 3.12 into the April 2018 update cycle. For historic purposes you can find 3.12 on GitHub and NuGet as well, and this was the last version to support the Visual C++ 2013 compiler.
The Windows 10 October 2018 Update (a.k.a. Version 1809) is now available along with the Windows 10 SDK (10.0.17763). The new SDK can be installed via VS 2017 (15.8.6 update or later) as an optional component under the UWP workload, as an individual component, or as a standalone installer. This release includes some updates to DirectX 12, DirectWrite, DXGI, and DirectXMath. See What’s New in Windows 10 for developers, build 17763.
The Visual Studio 2017 (15.8 update) is now available for download, and you should see the ‘new update available’ notification in the coming weeks–you can also get the update now by downloading the ‘free trial’ version of the installer which will let you update your system.
The Visual Studio 2017 (15.7 update) is now available for download, and you should see the ‘new update available’ notification in the coming weeks–you can also get the update now by downloading the ‘free trial’ version of the installer which will let you update your system.
The Windows 10 April 2018 Update (a.k.a. Version 1803) is now available along with the Windows 10 SDK (10.0.17134). The new SDK can be installed via VS 2017 (15.7 update) or as a standalone installer. This release includes some updates to DirectX 12, DirectWrite, and DXGI. See What’s New in Windows 10 for developers, build 17134.
There are April 2018 releases on GitHub for DirectX Tool Kit (DX11 / DX12), DirectXTex, DirectXMesh, and UVAtlas. These were more minor releases focused on code quality, fixing a few bugs, and cleaning up some new /analyze issues based on the C++ Core Checker rules that will be appearing in Visual Studio 2017 (15.7 update) which is currently in preview.
The Visual Studio 2017 (15.6 update) is now available for download, and you should see the ‘new update available’ notification in the coming weeks–you can also get the update now by downloading the ‘free trial’ version of the installer which will let you update your system.
The February 2018 release of DirectXMesh is available on GitHub. I wanted to call attention to this release in particular because I discovered an important and long-standing bug in the library that is now fixed.
With the release of the Fall Creators Update (October 2017) for Xbox One, UWP apps can now opt into expanded resources as was announced in this Windows Blog post. Details about UWP on Xbox One can be found on Microsoft Docs, but in this blog post I’ll be talking about a few technical issues and specifics I encountered while updating the UWP samples on the Xbox-ATG-Samples GitHub and working with the UWP versions of my Direct3D Game template.
The Visual Studio 2017 (15.5 update) is now available for download, and you should see the ‘new update available’ notification in the coming weeks–you can also get the update now by downloading the ‘free trial’ version of the installer which will let you update your system. This is second major update to the 19.x C++ compiler with a focus on C++17 conformance and bug fixes.
Note that as of today, CodePlex is now ‘read-only’ per this blog post. I’ve been recommending people using CodePlex for DirectX Tool Kit for DirectX 11, DirectXTex, DirectXMesh, and UVAtlas move to using GitHub for some time, but it’s now official. The CodePlex archive is expected to stay online as read-only, but with respect to my projects the GitHub version is now the only repo and the CodePlex version is an outdated mirror.
The Windows 10 Fall Creators Update (a.k.a. Version 1709) is now available. The Windows 10 Fall Creators Update SDK (10.0.16299) is now available and can be installed via VS 2017 (15.4) or as a standalone installer. This includes DirectXMath 3.11, updated DirectX 12, and updated Direct2D/DirectWrite. See What’s New in Windows 10 for developers, build 16299.
Since the release of Visual Studio 2017 in March, there have been two minor updates (15.1 and 15.2) per the new release rhythm. The first update (15.1) integrated the Windows 10 Creators Update SDK (15063), and the second update (15.2) included fixes for the IDE and tools. Neither of these updates included significant changes to the C/C++ compiler beyond a few specific hotfixes. The first major revision to the Visual C++ 19.1 compiler and libraries is now available with the latest update: Visual Studio 2017 (15.3).
High Dynamic Range (HDR) lighting has been used in games for a long time, popularized by titles like Valve’s Half-Life 2 using DirectX 9.0c. The rendering uses float-point render targets, allowing the lighting to exceed the normal 0 to 1 range. Then the final result is tone-mapped back into normal range for display. The result is much improved contrast, making it easier to see a mix of dark interiors with bright exteriors, more realistic outdoor lighting, and a host of special effects.
DirectXMath version 3.11 is now available on NuGet and GitHub. It will be included in the Windows 10 Fall Creators Update SDK, the Windows 10 April 2018 Update SDK, and the Xbox One XDK (June 2017 or later).
This is a bit of a nostalgic navel-gazing like my Windows XP post was back in October 2010, so please forgive my indulgence.
DirectXMath version 3.10 is included in the Windows 10 Creators Update SDK (15063) which is installed with Visual Studio 2017.
The Windows 10 Creators Update (a.k.a. Version 1703) is now available along with a new Windows 10 SDK release. The Windows 10 Creators Update SDK (10.0.15063) can be installed via VS 2017 (15.1) or as a standalone installer. This includes DirectXMath 3.10 and updated versions of Direct3D 12, DXGI 1.6, Direct3D 11.4 Direct2D, and DirectWrite. See What’s New in Windows 10 for developers, build 15063.
Visual Studio 2017 RTM is now available for download, including the updated Community edition. The VS 2017 RTM Redistribution packages are also available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more information see the Visual C++ Team Blog and Visual Studio Team Blog.
The February 2017 releases of DirectX Tool Kit for DirectX 11 and DirectX 12 are now available on GitHub. In addition to various bug-fixes and a few minor improvements to the input classes (Mouse, Keyboard, and GamePad), the libraries now also support C++/WinRT applications for UWP and Xbox One. C++/WinRT language projections allow you to use Windows Runtime APIs without using the C++/CX language extensions (i.e. the libraries will work with applications built with or without
As part of my multi-year personal project of providing open source replacements for the deprecated D3DX library once found in the legacy DirectX SDK, two libraries are focused on content creation tools and build pipelines. DirectXTex handles loading image files, texture processing including format conversion, mipmap generation, block-compression, and writing out ‘fully cooked’ textures into DDS files. DirectXMesh provides geometry support such as computing normals and tangent-frames, transparent vertex cache optimization, and provides utilities for extracting/inserting vertex data in vertex buffers.
The first thing to do is get up to speed on Direct3D 11 (see Getting Started with Direct3D 11), especially if you are coming from a background of knowing Direct3D 9. Jumping feet-first into Direct3D 12 without a solid grounding in what a Direct3D feature level means, DXGI device-and-swapchain creation, the modern HLSL compiler story, the fate of the legacy DirectX SDK, and the Direct3D 10/Direct3D 11 state model and graphics pipeline design is a recipe for confusion and frustration.
Based on some questions I’ve been getting lately, it seems like now’s a good time to revisit my classic post Anatomy of Direct3D 11 Create Device updated for Direct3D 12!
DirectXMath version 3.09 is included in the Windows 10 Anniversary Update SDK (14393) that ships with VS 2015 Update 3 when you install the Windows Tools 1.4.1 and select the 10.0.14393 Target Platform Version (see this blog post).
Windows 10 Anniversary Update (a.k.a. Version 1607) is now available along with a new Windows 10 SDK release. The Windows 10 Anniversary Update SDK (10.0.14393) can be installed via an optional install with VS 2015 Update 3 or as a standalone installer. This includes DirectXMath 3.09 and updated versions of Direct3D 12, Direct3D 11.4, DXGI 1.5, Direct2D/DirectWrite 1.3. Note XAudio 2.9 is unchanged. See What’s new in Windows 10 for developers, build 14393.
Since the release of DirectX Tool Kit four years ago, it has proven to be a very useful library for samples, indie and hobbyist projects, people moving from XNA Game Studio to C++, learning Direct3D 11, and for developers looking for supported replacements for the legacy D3DX library and the retiring of the legacy DirectX SDK.
VS 2015 Update 3 is now available for download, including the updated Community edition. The Visual C++ 2015 Update 3 Redistribution packages are also available (x86, x64), as well as the Remote Debugging Tools (x86, x64, ARM). For more information see the release notes.
VS 2015 Update 2 is now available for download, including the updated Community edition. The Visual C++ 2015 Update 2 Redistribution packages are also available (x86, x64), as well as the Remote Debugging Tools (x86, x64, ARM). For more information, see the Visual Studio Team blog. Be sure to read the Microsoft Docs page as well.
Back in January, I released a D3D11Win32Game Visual Studio 2013 template for Win32 desktop development primarily to support my DirectX Tool Kit tutorials. I modeled it after the basic template that we ship with the Xbox One XDK that consist of a
Game class which sets up a device, swap chain, and timed rendering loop. I’ve since updated the templates on GitHub and now have versions for VS 2015, for the Universal Windows Platform, for Direct3D 12, and versions with the
DeviceResources abstraction that is used in the official Windows Store and UWP templates.
The Windows 10 SDK (10.0.10586) for the November 2015 update of Windows 10 (a.k.a. Version 1511) is now available. It can be installed via an optional install with VS 2015 Update 1 or as a standalone installer. This includes DirectXMath 3.08, Direct3D 11.4, Direct3D 12.0, DXGI 1.5, updates to Direct2D/DirectWrite 1.3, and XAudio 2.9. See What’s new in Windows 10 for developers, build 10586.
VS 2015 Update 1 is now available for download, including the updated Community edition. The VS 2015 Update 1 Redistribution packages are also available (x86, x64), as well as the Remote Debugging Tools (x86, x64, ARM). For more information, see Brian Harry’s blog, the Visual C++ Team blog, and the Visual Studio Team blog. Be sure to read the Microsoft Docs page as well.
The XAudio2 library in the legacy DirectX SDK makes use of COM creation and reference counting for lifetime management, and a recent investigation has found a problem in this implementation. In short: in some situations the XAudio DLL itself is unloaded before the XAudio2 objects are completely destroyed, thus leading to an access violation. This normally happens on exit, although the exact details of when it might be evident depends on exactly which version of Windows you are using and the overall process layout for your application.
The GamePad abstraction in DirectX Tool Kit was designed to simplify implementing game controller input across the spectrum of platforms supported by DirectX Tool Kit: Windows desktop, Xbox One, Windows 8 Store, and now universal Windows Apps for Windows 10. In a similar vein, the July 2015 release of DirectX Tool Kit includes two new classes for handling keyboard and mouse input across Windows desktop, Windows 8 Store, and universal Windows apps for Windows 10.
As noted on Microsoft Docs, the DirectX SDK is deprecated. The June 2010 release is the last release, and “DirectX” is now part of the Windows SDK. There are really only three scenarios where you should continue to use the old DirectX SDK:
Last week saw the release of the final version of VS 2015, and yesterday was the release of the Windows 10 SDK (10.0.10240). The Windows 10 SDK is installed via VS 2015 Custom install options or as a standalone installer. This includes DirectXMath 3.07, Direct3D 11.3, Direct3D 12.0, DXGI 1.4, Direct2D/DirectWrite 1.3, and XAudio 2.9.
In my original post on using the debug layer, I mentioned several tricks for getting helpful behavior out of the Direct3D SDK debug layer for your applications. This best practice is demonstrated in my Visual C++ Game templates as follows:
Visual Studio 2015 RTM is now available for download, including the updated Community edition. The VS 2015 RTM Redistribution packages are also available (x86, x64), as well as the Remote Debugging Tools (x86, x64, ARM). For more information, see the Visual C++ Team blog, Brian Harry’s blog, Somasegar’s blog, and the Visual Studio Team blog.
The Advanced Vector Extensions 2 (AVX2) rounds out the instruction set introduced with AVX. The majority of the new instructions are for 256-bit registers, so they aren’t directly applicable to DirectXMath. AVX2 is very useful if trying to make a fully equivalent
double4 version of all the DirectXMath functionality which is otherwise focused on
float4 vectors, but that is beyond the scope of this article or the library generally.
The legacy DirectX SDK (June 2010) included the Samples Content Exporter utility for creating
.sdkmesh data files using Autodesk’s FBX SDK library. At the time, this utility used the 2010.2 version of the Autodesk FBX SDK which did not have support for Visual Studio 2010, and only worked with the VS 2008 toolset.
DirectXMath version 3.07 is included in the Windows 8.1 SDK Spring 2015 Update and Windows Phone 8.1 SDK Spring 2015 Update that ships with VS 2015 and VS 2013 Update 5. It is also included in the Windows 10 SDK. See the Visual Studio blog, the Visual C++ Team blog, and Soma’s blog for more details on these releases.
As you may have heard in the technical press, Microsoft is a more open-source friendly place these days, and has embraced GitHub for a number of high-profile projects. As a result of this shift and an internal push to move to git generally, I’ve updated my existing CodePlex projects so that I can easily mirror them to GitHub. For the immediate future, I plan to maintain both sites equally with the bulk of the documentation still residing on CodePlex, but you can get full source and releases from either location thanks to the magic of distributed VCS.
A preview of Visual Studio 2015 toolset with the Windows 10 SDK is now available through the Windows Insiders program.
Over the past five years, I’ve devoted significant time and effort to explaining the state of affairs with the legacy DirectX SDK. Developers can of course continue to use the legacy DirectX SDK (once they apply the workaround for the existing installation problems) with the Windows 8.0 SDK or later which comes with VS 2012 / 2013 / 2015 per the instructions on MSDN. This allows existing projects that still use deprecated D3DX9/D3DX10/D3DX11, XAudio 2.7, XInput 1.3, or XACT to build but still gain access to the latest Windows headers/libraries. You should in general rely on other methods for obtaining the latest debug device layer, tools, utility libraries, samples, Effects 11, DXUT11, and HLSL Compiler.
Presentations for our Game Developer Conference content from this year were recorded and are available now on Channel 9.
For people new to DirectX development, Microsoft Docs provides numerous tutorials for writing Windows Store apps, Windows phone apps, and Universal apps which all begin with creating a new project using a Visual Studio template built into to VS 2012 or VS 2013. For people targeting Win32 desktop (i.e. when developing on or for Windows 7), however, there’s no “DirectX” project template to be found in Visual Studio. Instead, you have to use the generic Win32 project and then add support for Direct3D such as is done with the Direct3D Win32 tutorial.
The Windows 8.1 SDK includes DirectXMath version 3.06 for use with Windows Store apps and Win32 desktop applications on Windows 8.x, Windows RT, Windows 7, and Windows Vista. DirectXMath 3.06 is also part of the Windows phone 8.1 SDK for use on Windows phone 8.x. There are a number of minor bugs in the library that have been reported by customers since it was released, which will be addressed in future SDK releases. In the meantime, since the code is all inline in the headers, you can make the fix directly to a local copy as needed or work around the issue in your own code.
For as simple a task as it seems, tracking time in Windows games is full of potential pitfalls. There are a number of different ways to do it, and the naive ones seem to work fine initially but then you have all kinds of problems later.
An update for Visual Studio 2013 is available for download.
Thanks to help from the original Microsoft developer, Xin Huang, the UVAtlas isochart technology that previously was only available in the deprecated D3DX9 library is now available on CodePlex. It is standalone and builds with the usual assortment of platform tools: Visual Studio 2013, Visual Studio 2012, Visual Studio 2010 with the Windows 8.1 SDK. It has no dependencies on the legacy DirectX SDK, D3DX, or DirectSetup. While not required, you will find DirectXMesh useful for generating the triangle adjacencies required for the isochart creation, and DirectXTex useful for loading/converting image data when generating IMTs from textures.
In the same vein as my post on where you can find many of the samples from the legacy DirectX SDK, where you can find all the various replacements for D3DX, and the status of various DirectX components; this post is a catalog of where you can find the latest version of various tools that shipped with the legacy DirectX SDK. Lacking that, it at least provides a status or alternative for the tool.
The next version of Windows is now available as a Technical Preview for developers via the Windows Insiders program and for MSDN Subscribers. For more details, see Announcing Windows 10.
The XInput API is almost trivial to use at first glance which is basically two simple C APIs with very simple parameters. There are, however, a number of subtleties that have crept in over the years, including the split between Windows 8 and previous releases. There is also a potential performance problem if you naively try to search for multiple gamepads that are not currently connected every frame due to the underlying overhead of device enumeration to look for newly connected gamepads. Also, while XInput was available on Xbox 360, the Xbox One makes use of a WinRT IGamePad API instead.
An update to Visual Studio 2013 is now available for download.
In addition to the release of DirectXMesh, I’ve also updated the other CodePlex projects with July 2014 releases.
A number of my projects over the past few years have been to provide modern replacements for the full range of functionality provided in the now legacy D3DX library: DirectXMath in the Windows 8.x SDK, DirectX Tool Kit and the DirectXTex texture processing libraries on CodePlex. To round out that set, I’ve created DirectXMesh for geometry processing functionality such as computing triangle adjacency, computing normals and tangent frames, and vertex cache optimization.
Windows 8.1 Update is now available via Windows Update, although it may take a while before it rolls out to your systems. See what’s new and this blog post with more information. There is also a nice best of BUILD post you may find useful as well.
Over the years, I’ve been asked about book recommendations, and it’s been challenging to keep up with them. I recently had a chance to review some books including a few prior to publication, so I’ve rounded up some recommendations for DirectX 11. Here I present them in chronological order of their publication date.
This week’s conference included a slew of new announcements on Microsoft platforms. You can see the complete list of recorded sessions on Channel 9, but here are links to the gaming and DirectX related talks you may want to review.
In answering some questions today, I remembered a topic I had been meaning to post about for some time: the seemingly simple act of creating a Direct3D 11 device. At it’s core, it’s pretty simple, but there’s more to it than it first appears.
An update to Visual Studio 2013 is now available for download.
The December 2013 release of DirectXTK is now available on
CodePlexGitHub, and includes a C++ implementation of the XNA Game Studio’s low-level audio framework using XAudio2 and X3DAudio.
Now that VS 2013 has shipped, Windows 8.1 SDK is finished, and Windows 8.1 has hit GA–see this post for details–, I’ve made new releases of my
CodePlexGitHub projects. Here is a summary of the changes since the last time I blogged about these projects.
Visual Studio 2013 RTM is now available. The VS 2013 RTM Redistribution packages are also available (x86, x64, ARM), as well as the Remote Debugging Tools (x86, x64, ARM). For more information, see the Visual C++ team blog, Somasegar’s blog, and the Visual Studio team blog.
A common source of confusion for Windows development is the Windows SDK naming scheme. For example: Can someone use the “Windows SDK for Windows Server 2008 and .NET Framework 3.5” to target Windows XP?
Microsoft has moved away from providing samples in SDKs for a number of reasons, but primarily to reduce the size of the standalone downloads and to minimize the size of the SDKs when included in other products (such as the Windows 8.x SDK being included with VS 2012 and VS 2013). The MSDN Code Gallery provides an online repository for samples, including both official Microsoft samples as well as community contributions. Here’s a list of the samples from the legacy DirectX SDK (June 2010) and their locations online if available.
With the deprecation of the DirectX SDK (see Where is the DirectX SDK? and Where is the DirectX SDK (2013 Edition)?), there’s been a lot of guidance both on this blog and on Microsoft Docs on moving to newer, supported solutions. As a number of folks have noticed, DXUT (aka the DirectX SDK samples framework) is not included in the Windows 8.x SDK. This post provides an updated version of DXUT for Direct3D 11. The primary purpose of this release is to remove dependencies on the DirectX SDK for D3DX9, D3DX11, and DXERR. It also includes some code tidying and a few customer requests.
Back when Windows Vista launched and the User Account Control feature was first introduced, there was one key recommendation for game developer writing PC games: your game should not require administrator rights to run, and you should add the proper embedded manifest to the game EXE so Windows Vista could tell the game was updated for the new OS. With Visual Studio 2005, this was done by turning on some settings for the Linker (Generate Manifest File: Yes) and Manifest Tool (Embed Manifest: Yes) and then setting the “Additional Manifest Files” field to point to a text file that contained:
Over the past few years, I’ve been working on a number of projects in part motivated by the need to replace legacy D3DX functionality. As noted on Microsoft Docs, all versions of D3DX are deprecated and are not shipped with the Windows 8.x SDK. This includes D3DX9, D3DX10, and D3DX11. There are plenty of options for moving existing code over to newer, more supportable solutions most of which are now shared-source.
It has been a busy summer which has resulted in “version 1.2” of the DirectXTex texture processing library. The focus of this release has been on improving Block Compression support. The biggest new feature is the integration of the DirectCompute 4.0 accelerated BC6H / BC7 texture compression codecs from the BC6HBC7EncoderCS sample. The latest
texconv command-line tool will attempt to use the DirectCompute version when compressing for BC6H / BC7 when running on a system with a DirectCompute 4.0 capable hardware device (aka a Feature Level 10.0 or 10.1 video card with the optional DirectCompute feature or a Feature Level 11.x video card). This is a huge increase in performance compared to the original D3DX11 BC6H / BC7 software codecs.
See also “Where is the DirectX SDK (2015 Edition)?”
At BUILD 2013 last week, Microsoft released the Windows 8.1 Preview, Visual Studio 2013 Preview, and the Windows SDK for Windows 8.1 Preview (included in the VS 2013 Preview). Note that RTM was released on October 17th, 2013.
The DirectX Texture library (aka DirectXTex) for Direct3D 11 (originally released on this blog and made an official CodePlex project) has continued to improve. It’s been a busy month of work, but with this release I’ve hit a milestone of sorts so I’m declaring this DirectXTex “Version 1.1”. This release includes custom filtering implementations to fully finish out the feature set, and as of this release all the functionality that was in D3DX11 for texture processing is now available in DirectXTex. Resizing and mipmap generation has been updated to avoid a number of known issues with the Windows Imaging Component (WIC) including proper HDR/XR format handling, sRGB gamma correct filtering and conversion behavior, mirror/wrap texture address mode filtering semantics, and implements the finite low-pass triangle filter that was available in D3DX. Volume map mipmap generation now supports all filtering modes and supports non-power-of-2 volume maps.
The Microsoft presentations at GDC 2013 are freely available from the GDC Vault.
The second update to Visual Studio 2012 is now available for download. For full details, see the following blog posts: Visual Studio team blog, Somasegar’s blog, and Visual Studio ALM + Team Foundation Server blog.
The Windows 8.0 SDK includes DirectXMath version 3.03 for use with Windows Style apps and Win32 desktop applications on Windows 8, Windows RT, Windows 7, and Windows Vista. DirectXMath 3.03 is also part of the Windows phone 8.0 SDK for use on Windows phone 8. There are a number of minor bugs in the library that have been reported by customers since it was released, which will be addressed in future SDK releases. In the meantime, since the code is all inline in the headers, you can make the fix directly to a local copy as needed or work around the issue in your own code.
As of today, IE 10 for Windows 7 has been officially released. IE10 for Windows 7 includes portions of the DirectX 11.1 runtime for Windows 7 Service Pack 1 and Windows Server 2008 R2 Service Pack 1 via KB 2670838.
Full technical details of what’s included in KB 2670838 are covered on Microsoft Docs. The primary difference between the prerelease and the final version is that WARP supports Feature Level 11.0 with the updated runtime.
The DirectX Toolkit (aka DirectXTK) for Direct3D 11 introduced last year and made an official CodePlex project has continued to improve. The DirectXTK project provides ‘runtime’ utility shared-source C++ code to replace the deprecated D3DX library for Win32 desktop applications using Direct3D 11 (Windows 8, Windows 7, Windows Vista SP2+KB971644, and the Server equivalents) as well as Windows Store apps on Windows 8. This complements DirectXTex which provides shared-source C++ code for ‘build time’ texture processing that used to ship in D3DX, DirectXMath and Spherical Harmonics math which replace D3DXMath, and the D3DCompile API which replaced the once integrated HLSL compiler. For Win32 desktop applications, there’s also an Effects 11 to replace the FX library from D3DX9.
Windows 8 includes a number of changes to the parental control ratings systems supported by Windows Family Safety (aka Windows Parental Controls) for Win32 desktop games. These changes are now available on Windows 7 via KB2773072. It is recommended that all game publishers populate their GDFs using the latest Game Definition File Editor (
GDFMaker.EXE) in the Windows 8.0 SDK rather than using the legacy DirectX SDK version which does not support these ratings changes.
When programming graphics applications, one of the more frustrating aspects of development is that you can end up writing thousands of lines of code and when you run it, all you get is a blank screen. Or maybe a blue screen. Or a crash. But often, not actually a useful image. Errors in state setting, transformation math, and other coding problems can mean your application is completely valid just not useful. Other kinds of coding problems are due to misuse or abuse of the Direct3D API itself. In those cases, enabling the ‘debug’ device can quickly help identify the problems.
There are a number of new features and some bugs fixed in the Windows Imaging Component for Windows 8. With the installation of KB 2670838 this new version of WIC is also available on Windows 7 Service Pack 1.
The Effects 11 library (FX11) was made available as shared-source in the DirectX SDK. Previous versions of the Effects library were part of D3DX (FX9) or built into the OS (FX10). With the DirectX SDK now legacy (see Where is the DirectX SDK?, Where is the DirectX SDK (2013 Edition)?, and Where is the DirectX SDK (2015 Edition)?), there are still a number of people looking for the latest version since it is not included in the Windows 8.0 SDK. This post provides an updated version of the Effects 11 (FX11) library. The primary purpose of this release is to remove the dependencies on the legacy DirectX SDK for the D3DX11 headers, but it also includes some code tidying and a few customer requests.
Writing shared code for Windows Store, Xbox One, Universal Windows Platform (UWP) apps, and Win32 desktop apps
There are a number of areas of the system where you must use WinRT APIs to access the required functionality for Windows Store apps, and there is no Win32 equivalent included in the Windows Store apps API family. This code is not a good candidate for dual-use scenarios, but there are times when it makes sense to house both the WinRT and Win32 implementation in the same module. Generally you should prefer to have the client application handle this platform-specific functionality and provide the information needed to your dual-use shared code as parameters, but this is not always convenient or practical.
Writing shared code for Windows Store, Xbox One, Universal Windows Platform (UWP) apps, and Win32 desktop apps
(continued from part 1)
The majority of the “core” API family are new Windows Runtime (WinRT) style APIs which are not available for down-level Win32 desktop applications. Therefore the overlap is in Win32 APIs that are available to both kinds of applications. In many cases, the Windows Store apps ‘core’ API family contains a Win32 API that is very recent. Therefore, a key technique for writing dual-use code properly is learning to leverage the
_WIN32_WINNT control define for Windows Headers.
Writing shared code for Windows Store, Xbox One, Universal Windows Platform (UWP) apps, and Win32 desktop apps
Apps written for the Windows Store make use of the Windows Runtime (WinRT) and a restricted subset of Win32 APIs located in the core API family. Traditional Win32 desktop apps have access to a larger desktop API family, but this is subject to various levels of OS support required for each function. These two taken together can make it challenging to write shared code libraries and helper functions that can successfully compile for both Windows Store apps and Win32 desktop applications supporting Windows Vista, Windows 7, and Windows 8.x.
In this installment in our series, we cover a few additional instructions that extend the AVX instruction set. These instructions make use of the VEX prefix and require the OS implement “OXSAVE”. Without this support, these instructions are all invalid and will generate an invalid instruction hardware exception.
The Advanced Vector Extensions (AVX) instruction set goes beyond just adding more instructions like we’ve seen in previous installments. AVX also introduces an extended register file and a new x86 instruction encoding prefix.
The SSE4 instruction set consists of two parts, referred as SSE4.1 and 4.2. The intrinsics are located in the
smmintrin.h header. The SSE4.1 instruction set is the most interesting for DirectXMath, while SSE 4.2 adds some more specialized instructions for CRC checks and string handling. The key new features are a flexible dot-product instruction, float4 vector rounding, a 2-vector ‘mux’ blend, and some specialized extract/insert operations.
The SSE3 instruction set adds about a dozen instructions (intrinsics are in the
pimmintrin.h header). The main operation these instructions provide is the ability to do “horizontal” adds and subtracts (ARM-NEON refers to these as ‘pairwise’ operations) for float4 and double2 data.
The DirectXMath library provides high-performance linear algebra math support for the typical kinds of operations found in a 3D graphics application. The library achieves this by making use of specialized SIMD (Single-Instruction-Multiple-Data) instruction sets to work on 4 single-precision float values at a time. The design of the library is itself heavily influenced by these instructions to provide data in a way most friendly to efficient computation.
Recently many older releases of the DirectX SDK and REDIST packages expired and were removed from the Microsoft Downloads Center site. The DirectX SDK and REDIST packages for all 2008, 2009, and 2010 releases are currently available, but all 2007 and prior releases are no longer hosted by Microsoft.
The Windows SDK for Windows 8 (aka Windows 8.0 SDK) RTM version is now available on Microsoft Docs. See Where is the DirectX SDK? for details on DirectX content in the Windows 8.0 SDK. This includes the
D3DCompiler_46.DLL release of the HLSL compiler, DirectXMath version 3.03, DirectX 11.1 headers/libs, and the GDF tools.
DirectXMath (aka XNAMath version 3) provides almost all the functionality of the original D3DXMath library with two exceptions. The first is the ‘matrix stack’ helper and the second is the ‘spherical harmonics’ math functions. The matrix stack is fairly easy to implement, but the SH math functions are another story. The original code for SH math in the D3DX utility library was written by John Snyder (MSR) and Peter-Pike Sloan (former Microsoft now at NVIDIA), and was the basis for a number of DirectX SDK samples and graphics publications as well as several ATI/AMD demos. With the removal of the SH math functionality from D3DX11 and the retirement of the D3DX library generally (see Where is the DirectX SDK?), this post provides a replacement for this functionality.
The July 2012 release of the Xbox 360 XDK includes a new version of XNA Math, version 2.05. We are making it available here for Windows developers. The update is subject to the same EULA as the DirectX SDK (June 2010) release MIT license.
In various forums and discussion threads of late, I’ve seen some confusion about the difference between “DirectX 11” the API and “DirectX 11” the class of video hardware. The key to this is the concept of a “Feature Level” for devices which simplifies the old Direct3D 9 “sea of capabilities bits” to an increasingly capable group of level-sets for video hardware. An application requests a particular feature level (or a set of feature levels where the application can optionally use more advanced features if present), and the majority of the capabilities are known already. There are some specific optional features and format usages that may or may not be present (and thus require the use of
CheckFeatureSupport), but most things can just be assumed based on the current device’s Feature Level. This makes writing games and applications much simpler, and more importantly if something works for Feature Level X, then you can assume it will work for Feature Level X+1. This simplifies fallbacks as well, where the application only has to handle a few discrete cases. The HLSL shader profiles are designed so that a shader compiled for
4_0_level_9_1 will work on all feature levels, and a shader compiled for
4_0 will work on Feature Level 10.0, 10.1, 11.0, or 11.1 devices to limit the combinatorial explosion problem of shader permutations.
The Visual Studio 2012 Release Candidate (formerly known as “Visual Studio 11”) is now available including all editions: Express, Professional, Premium, and Ultimate. See the Visual Studio blog entry for more information. As with the Visual Studio 11 Beta, this release includes a new C++ compiler, Standard Library with C++11 support, a graphics debugger, and integrated HLSL compiler. There’s a nice write-up on the performance of the new compiler and build system as well.
Windows 8 includes numerous improvements as discussed on the Building Windows 8 blog, the DirectX 11.1 Runtime (including WARP support for feature levels 11.1 and 11.0), and for game developers and publishers it includes some important updates to the Windows Family Safety / Parental Controls system for game ratings.
With the transition of the DirectX SDK to the Windows SDK (see Where is the DirectX SDK?), and the Windows SDK samples now being hosted online on MSDN’s Code Gallery, I’ve begun the process of cleaning up older DirectX SDK samples and posting them directly online.
With the inclusion of XAudio2 in Windows 8, there’s been renewed interest in learning how to use this API. The documentation on Microsoft Docs is of course a great place to start, and be sure to read through the entire Programmer’s Guide as there’s lots of great information throughout. You should also start by watching the BUILD 2011 presentation on audio. There are also a number of presentations from past Gamefest events that cover audio and XAudio2. While these talks are focused on the older versions, XAudio 2.8 is essentially the same design and API with a few specific differences so this information is all very relevant.
With the retirement of D3DX (See “Where is the DirectX SDK?”, “Where is the DirectX SDK (2013 Edition)?”, and “Where is the DirectX SDK (2015 Edition)?”), there is some confusion about how applications access the High-Level Shader Language (HLSL) compiler. As mentioned in an earlier post (See “What’s up with D3DCompiler_xx.DLL?”), the HLSL compilation functions, shader reflection, and some support functions for the compiler were pulled out of D3DX as of the DirectX SDK (August 2009) release. While many developers continue to use the D3DX functions to compile HLSL and Effects, they are just pass-through functions to the D3DCompile API which can be used directly instead. The latest version of the D3DCompile API includes some new functions as well such as D3DCompileFromFile and D3DCompile2.
There are a number of previous posts on the state of
.DDS files which is the container format for Direct3D resources (see Microsoft Docs for some basics).
In an earlier post, I covered how to use XInput with the release of the Windows 8 Consumer Preview. In this post, I’ll discuss how to make use of headset audio for the Xbox 360 Common Controller.
The DirectX SDK (June 2010) release includes a little utility header,
XDSP.H. This contains CPU-based functions for computing the Fast Fourier Transform (FFT) as well as some related multi-channel audio interleave/deinterleave functionality primarily used in writing custom xAPOs for XAUDIO2. The DirectX SDK version makes use of SSE intrinsics, which means it supports Windows x86 and x64 native code generation. This header is not included in the Windows SDK 8.0 (see “Where is the DirectX SDK?”). If writing a custom xAPO for Windows Store apps (a.k.a. Metro style apps), you also likely want to support the Windows RT (aka Windows on ARM) platform as well.
The Windows 8 Consumer Preview includes version 1.4 of the XInput API for use with Xbox 360 Common Controller compatible game devices, and this API is fully supported for both Windows Store apps (including x86, x64, and Windows on ARM) and desktop Win32 applications. The full details of the differences compared to XInput 1.3 which shipped in the DirectX SDK (June 2010) release are addressed on Microsoft Docs. The headers and libraries for Xinput 1.4 are included in the Windows SDK 8.0 that is part Visual Studio 11 Beta. Windows 8 also includes an updated driver for these devices,
DirectX SDK (June 2010) includes the Samples Content Exporter utility for creating
.sdkmesh data files using Autodesk’s FBX SDK library. At the time, this utility used the 2010.2 version of the Autodesk FBX SDK which did not have support for Visual Studio 2010. Therefore, the VS 2010 project file was set up to require the VS 2008 toolset.
One of the little utility libraries in the DirectX SDK is a static library for converting HRESULTs to text strings for debugging and diagnostics known as
DXERR.LIB. There were once even older versions of this library,
DXERR9.LIB, but they were removed from the DirectX SDK many years back in favor of a unified
DXERR.LIB. The DirectX Error Lookup Utility is nothing more than a little front-end UI tool for getting results from
The Windows 8 Consumer Preview includes version 2.8 of the XAudio2 game audio API built in, and this API is fully supported for both Windows Store apps (including x86, x64, and Windows on ARM) and desktop Win32 applications. The full details of the differences compared to XAudio2 2.7 which shipped in the DirectX SDK (June 2010) release are addressed on Microsoft Docs. The headers and libraries for XAudio 2.8 are included in the Windows SDK 8.0 that is part of Visual Studio 11 Beta.
Slides and recorded audio for the Microsoft presentations at GDC 2012 are now available on Microsoft Download Center.
The Windows SDK for Windows 8 (included with Visual Studio 2012) ships with the DirectXMath library which is the next major revision of the C++ SIMD graphics math library known as “XNAMath” in the DirectX SDK and Xbox 360 XDK. Think of it as “XNAMath version 3”—for the historically inclined, XNAMath itself was essentially “xboxmath version 2”
Developers working on games for Windows are already familiar with the DirectX SDK. Important changes to the DirectX family of technologies are included in the new Windows SDK, which is the new home for the DirectX SDK. Be sure to read “Where is the DirectX SDK?” for the details.
See also “Where is the DirectX SDK (2015 Edition)?”
The DirectX SDK is now part of the Windows 8.0 SDK. The new Windows 8.0 SDK is where you’ll find DirectX 11.1, Direct2D, DirectWrite, DXGI 1.2, WDDM 1.2, DirectXMath, Feature Level 11.1 devices, XINPUT 1.4, XAUDIO 2.8, WIC2, the “Developer Runtime” (debugging layers and the REF device), and the latest HLSL compiler (
D3DCompiler_*.DLL). Samples are now shipped online and can be found at the MSDN Code Gallery. We recommend using the Windows 8.x SDK instead of the DirectX SDK, or at a minimum using the Windows 8.x SDK primarily with only specific usages of the legacy DirectX SDK.
The DirectXTex library does an excellent job of providing all the ‘texture content processing’ functionality from the venerable D3DX library (see “Where is the DirectX SDK?”), and DirectXMath (or the older XNAMath) takes over for D3DXMath. Shawn Hargreaves and I have been putting together another utility library, dubbed “DirectX Tool Kit” or “DirectXTK”, to address some additional runtime needs for Direct3D 11 applications.
The Visual Studio 11 Beta release is now live. For an overview of the new product, take a moment to read this Visual Studio blog entry as well as an entry on the Visual C++ blog. This Beta release includes the full range of SKUs including Express, Professional, Premium, and Ultimate. As with the Developer Preview, this release includes a new C++ compiler and Standard Library with additional C++11 support, an integrated PIX for Windows replacement called Visual Studio Graphics Diagnostics including HLSL debugging, the latest HLSL compiler, and a DDS image viewer (both legacy and ‘DX10’ extension variants).
Over the past few month we’ve been getting reports of problems with the DirectX SDK (June 2010) setup failing for customers displaying an installation error when it gets to point of installing the “redistributable packages”. This particular problem has been traced to an issue with the Visual C++ 2010 Redistributable Package version 10.0.30319 (RTM). When the 10.0.40219 (Service Pack 1) version is already present on the system, the 10.0.30319 (RTM) version returns a failure instead of a success as was expected.
The Beta is now available, so should be used instead of the older Developer Preview mentioned here.
The next version of Visual Studio is currently available for download as a Developer Preview. This release includes a new C++ compiler and Standard Library with additional C++11 support, an integrated PIX for Windows replacement called Visual Studio Graphics Diagnostics including HLSL debugging, the latest HLSL compiler, and a DDS image viewer (both legacy and ‘DX10’ extension variants).
The presentations for the Gamefest 2011 conference are now available on Microsoft downloads. Here are the main talks of interest to Windows developers.
Over the past few years at game conferences we’ve talked a lot about the Xbox LIVE service and the many great opportunities on Xbox 360, Windows, and Windows Phone using it. What we’ve talked less about in these venues are best practices for those writing their own multiplayer clients and servers. While the glory days of DirectPlay are long past (it was a great technology when you had to contend with head-to-head modem play, direct serial connections, TCP/IP over modem, IPX/SPX, and TCP/IP all at once), there’s more to Windows networking than WinSock 2.
This is the sample package for Matt Lee’s Gamefest 2011 presentation Tiled Resources for Xbox 360 and Direct3D 11 . See the documentation files in the package for more details.
As part of my Gamefest 2011 presentation Modern Texture Content Pipelines (link), I demonstrated the “DirectXTex” library which is a shared source implementation of DDS file I/O (including the “DX10” header extension), texture content processing operations (resize, format conversion, mip-map-generation), software block compression (BC1 - BC7), height-map to normal-map conversion, and a simple .TGA file reader and writer.
So you’ve downloaded the latest
DirectX SDKWindows SDK and start digging through the various tutorials, samples, and documentation, and you are trying to get a handle on where to start learning Direct3D 11…
The Beta for the Microsoft Research Kinect for Windows SDK is now available at the project website.
Direct3D 11 class hardware through the Direct3D 11 API supports two new texture compression formats: BC6H and BC7. These new Block Compressed formats provide excellent compression for High-Dynamic Range (HDR) images and higher-fidelity traditional content. The D3DX11 library includes a software implementation of the encoder, but the new BC formats are extremely asymmetric meaning the encoding algorithm has a very large search space to determine the optimal compression for each 4x4 block. This makes a great candidate for a GPGPU DirectCompute implementation of the compression algorithm. The BC6HBC7EncoderDecoder11 sample in the DirectX SDK provides such an implementation using DirectCompute 4.0.
The Microsoft presentations from the Game Developer Conference 2011 are now available on the Microsoft Downloads site. There were a number of talks on Windows, Windows phone 7, and Kinect. The presentations of interest to Windows developers are:
For those of you who have not yet moved to Visual Studio 2010 Service Pack 1, be aware that the April 2011 Security Bulletin MS11-025 includes a security fix to Microsoft Foundation Classes (MFC) runtime for Visual Studio 2005 Service Pack 1, Visual Studio 2008 Service Pack 1, and Visual Studio 2010 RTM. There are new CRT redistribution packages available for each of these that include the fix.
As I noted in my post on a DXWSETUP back in November 2010, we have addressed a number of bugs in DirectSetup after the release of the DirectX SDK (June 2010). These bugs include some localization display issues with the EULA and various non-Codepage 1252 languages, plus resolving a problem with .NET 4.0’s strong deprecation of
GetCORVersion function used to detect which version of .NET (if any) is present on the system. Even without the legacy Managed DirectX 1.1 CABs present, this check triggers a non-fatal error pop-up on systems with only the .NET 4.0 Runtime installed. As noted before, this does not impact Windows Vista, Windows 7, Windows Server 2008, or Windows Server 2008 R2 machines which always include the .NET 2.0, 3.0, or 3.5 runtime. It doesn’t impact most existing Windows XP systems since most have either no .NET runtime installed or some version of .NET 2.0, 3.0, or 3.5. This also includes the change for an improved error message when run on Windows XP RTM, Windows XP SP1, or Windows Server 2003 RTM machines (which are not supported scenarios, but the original June 2010 release of DirectSetup generates an obscure error message in this case).
Visual Studio 2010 Service Pack 1 is now available on MS Downloads.
In the DirectX SDK (June 2010) release, the HLSL compiler was updated from the August 2009 version. As part of this update, the HLSL complier now supports a new feature: symbolic derivatives. If you are interested in learning more about what this feature is and what you can do with it, you should check out this paper from Microsoft Research: Symbolic Differentiation in GPU Shaders
The February 2011 release of the Xbox 360 XDK includes a new version of XNA Math, version 2.04. We are making it available here for Windows developers. The update is subject to the same EULA as the DirectX SDK (June 2010) release.
Windows 7 / Windows Server 2008 R2 Service Pack 1 is now available on Windows Update, MSDN Subscriber Downloads, and TechNet. The announcement from the Windows team can be read on the Windows Team Blog, and one from the server team can be found here.
Some users of XNAMath have reported a range problem with the XMVectorFloor and XMVectorCeiling functions with the SSE implementation (i.e. whenever the values are greater than
INT_MAX). These fixes will be included in a future release of XNAMath, but since XNAMath is an all-header implementation it can also be fixed directly by affected developers in the
Doing some work on the
texconvex tool (the Direct3D 10.x/11 version of the Texture Conversion Tool
texconv), I discovered that my use of the NULL render device resulted in garbage output from this tool in some scenarios. This is easily remedied using the WARP or REFERENCE device.
Over the past few years, I’ve done a lot of presentations on x64 technology as it pertains to game developers and DirectX technologies. Here is a collection of links for developers interested in learning more about the Windows x64 OS and x64 native programming generally.
With the DirectX SDK (June 2010) release and the addition of support for Visual Studio 2010, I’ve been seeing a lot of questions of the form:
How do I create a DirectX .NET application in Visual Studio 2010? I can’t find Microsoft.DirectX to add to my project but I have the DirectX SDK (June 2010) release installed.</em>
As with many seemingly simple questions on a technical topic, this one is actually quite complex.
We’ve republished the June 2010 DirectX End-User Runtime Web Installer, which now shows a release date of
"11/30/2010" “4/18/2011”. This deploys all the same binaries as the June 2010 version, but the setup itself has been updated to resolve a few key issues.
I recently found a minor problem with the existing D3D11InstallHelper sample that shipped in August 2009, February 2010, and June 2010 versions of the DirectX SDK. The supplied version of
D3D11Install.exe is correct, but if you compile it using the Visual Studio project yourself, it does not properly inject a reference to the Windows Common Controls version 6.0 into the manifest file. The result of this is that the dialogs (which all contain hyperlinks using the SysLink common control) do not initialize and fail to display.
One of our areas of focus for the DirectX SDK (June 2010) release was to make sure our samples supported Direct3D 11 hardware from NVIDIA, as we had previously only had AMD/ATI Direct3D 11 hardware to work with. There were a few issues that arose right around the release with the SubD11 and PNTriangles11 samples. At the time we thought it was related to the driver, but in fact it turned out to be due to tessellation shader related optimization issues in the June 2010 version of the HLSL complier.
Today, October 22, 2010, the sale of Windows XP comes to an end. There will still be support available for Windows XP Service Pack 3 through April 2014, and it will be sticking around for a time in some business, government, and emerging market settings, but by in large the days of Windows XP are fading. The date has been moved a few times, but today marks the beginning of the final end for what has been a very long-lasting Windows release. I thought I’d take the opportunity to reflect on the product with respect to PC gaming and game developers.
When the DirectX technology was created in the mid 1990s, it was designed to be deployed by games into the Windows 95 operating system as part of the game’s install process. As the number of supported operating systems grew, so did the complexities of deploying these components. The DirectSetup API and well-known
DXSETUP.EXE program became common place on game disks, and PC gamers everywhere were trained to run it themselves to keep their systems ready for the latest games. Of course, there were also many problems with poorly written installers, misconfigured machines, and the fact that DirectX components themselves were rather invasive into the system.
There’s a lot of interest in the Multithreading features in Direct3D 11, especially since it can be used with existing Direct3D 10.x and 10level9 class hardware as well as new Direct3D 11 hardware. In addition to the Windows DirectX Graphics documentation, here are a number of resources for learning more about Direct3D 11 multithreading:
Since the release of Windows XP Service Pack 2, support for the Windows Media codec (WMV) has been built into the OS, so developers have come to rely on it being there particularly for DirectShow playback of cutscenes or video textures. On Windows Vista, we introduced the Windows Media Foundation APIs as well. Much like the core of DirectX becoming part of the OS, these components being present on all modern versions of Windows simplifies the deployment story for applications.
UpdateSubresource method on the
D3D11DeviceContext interface takes as one of it’s parameters an optional destination offset:
The new hardware tessellation feature available on Direct3D 11 video cards has great potential, but using it effectively currently requires understanding higher-order surfaces as well as a myriad of performance implications. In addition to the Windows DirectX Graphics documentation, here are a number of resources for learning more about using Direct3D 11 Tessellation:
Over the past few releases of the DirectX SDK, I’ve been working on updating our documentation for the
DDS file format. The DDSWithoutD3DX and DDSWithoutD3DX11 samples in the DirectX SDK (June 2010) release demonstrate the details of interpreting the DDS file format for basic 2D textures and 2D texture arrays for Direct3D 9, Direct3D 10.x, and Direct3D 11. Since the June release, I’ve been expanding the sample to support cubemaps, volume textures, and 1D textures. In the process I also found a number of minor issues with the DDSTextureLoader code and the
The DirectX 11 Compute Shader, also known as Direct Compute, is a powerful but complex feature. In addition to the Windows DirectX Graphics documentation, here is a list of resources for learning to use this technology:
The DirectX SDK (June 2010) release includes updates to the Games for Windows technical articles (v1.4.0010). There were no significant changes to the technical requirements, but this release includes a number of minor clarifications and some notes on Visual Studio 2010. As always, this pair of documents is an excellent starting point for current Windows Gaming best practices particularly around deployment. The appendix contains important recommendations for game middleware vendors, as well as a list of technology showcases game developers should consider for their titles.
The DirectDraw API has been more or less deprecated for game developers since the release of DirectX 9.0 SDK back in 2002. The last time we shipped samples or documentation on DirectDraw dates back to the DirectX 8.1 SDK. Game developers looking to do 2D rendering should be using Direct3D, or on systems with DirectX 11 the Direct2D API could also be a good choice. The DirectDraw documentation can still be found on Microsoft Docs. A few lingering issues, however, has kept the DirectDraw header and import library in the DirectX SDK for many long years…
The Gamefest 2010 Conference US and UK content (presentations and audio where available) is now available on Microsoft downloads, and the
website has been updated with a complete index of talks. All of the Project Natal material is of course confidential and is only available to those with an Xbox 360 Developer account, but the majority of the other talks are public as usual.
The DirectX SDK (June 2010) release includes the fixes to the DDSWithoutD3DX and DDSWithoutD3DX11 samples I mentioned in earlier posts. The Programmer’s Guide for DDS in the Windows DirectX Graphics documentation was also updated to reflect the latest format details.
If you install the “Windows XP Support” option in Visual Studio 2012 or later, then you already have the Windows 7.1A headers & libraries. They are used by the
v1??_xp Platform Toolset option. See this blog post.
With the June 2010 DirectX SDK, one of our work items was to try out the various DirectX 11 samples against the NVIDIA DirectX 11 graphics parts (NVIDIA GeForce GTX 470/480) now that they are available. For the August 2009 and February 2010 releases, we only had the AMD/ATI DirectX 11 graphics cards available (ATI Radeon HD 5000 Series). Video cards have traditionally competed on a mix of features, performance, and price. These days they are increasingly also competing on power consumption–while this has always been true in the mobile & laptop space, it is becoming increasingly important even in desktops.
The June 2010 release of the DirectX SDK is now available on Microsoft Downloads. This release introduces official support for Visual Studio 2010, an updated version of the HLSL compiler with numerous fixes and minor improvements, improved documentation and samples, XNAMath C++ SIMD library version 2.03, and PIX for Windows usability improvements.
For most of the early evolution of the HLSL language, the compiler was part of the D3DX utility library (aka D3DX9). This compiler supported Shader Models 1.x, 2.0, and 3.0 for Direct3D 9 vertex shaders and pixel shaders. For Direct3D 10, the graphics team started a new compiler to support the demands of the new Direct3D 10 API with Shader Model 4.0 versions of vertex, pixel, and geometry shaders. Direct3D 10.x added Shader Model 4.1 variants. Direct3D 11 adds Shader Model 5.0 and two new classes of shaders for tessellation (hull & domain) shaders.
There have been two main consequences to this new HLSL compiler development effort.
One of the new features for the PIX for Windows tool for the upcoming June 2010 DirectX SDK release is support for object naming. This is a long-standing feature of the Direct3D 10.x and Direct3D 11 SDK Debug Layers, but not a well advertised one. We’ve mentioned it in a few talks (including in the appendix to my recent Gamefest 2010 and GDC 2010 DirectX 11 Technology Update), but as we are still going through the process of posting this material I thought I would take a few moments to highlight it.
The next release of the DirectX SDK is scheduled to ship to developers in early June 2010. This release will be the first update to the Windows Graphics components since the August 2009 release and will also introduce support for Visual Studio 2010.
Visual Studio 2010 launched today. The DirectX SDK team is very excited about this new version because among the many improvements and new technologies for this release (upgraded IDE, C++ 0x supprt, .NET Framework 4.0, Concurrency Runtime, etc.) there were also some significant changes made to the Visual C++ compiler. Anyone using XNAMath will greatly benefit from the new compiler as the code-gen for intrinsics have been improved, as well as including a number of important improvements for 64-bit native codegen. I highly recommended you review this Visual Studio team blog for details on the compiler and linker improvements for the new release.
I’m off to San Francisco for this week’s conference. Microsoft will be doing two tutorials days again this year, but unlike previous years it is a mixed track of Windows, Xbox 360, and other Microsoft game platforms including XNA Game Studio material on both days. At prior conferences the XNA Game Studio product was on one day, and everything else was on another day. We are giving a number of talks through Sponsered Sessions during the main conference as well.
There are many version numbers in Windows, and many different ways to obtain and use them. The plethora of ways to get versioning information, and the many different kinds of components involved, has typically resulted in lots of rope for developers to hang themselves. These messes tend to explode when a new Service Pack comes out or with a new release of the Windows OS. This is often a shame because otherwise the programs work perfectly well on the new version of Windows as long as you lie to them about the OS version number. In fact there’s a lot of work put into identifying failing applications and putting in explicit code to lie about the OS version number for each of them, but this manual can’t be done for every piece of software on the planet. There’s been some recent work to try to automate this, but it too relies on developers to “do the right thing” so ultimately it isn’t a problem that can be completely fixed here in Redmond.
The DirectX SDK (February 2010) release is live on Microsoft downloads. See that page for full release notes.
This release contains:
For anyone doing work with DirectX, you’ve likely run into texture data being stored as a
.DDS file. This format has it roots in the misty dark ages of DirectX history and in fact “DDS” stands for “DirectDraw Surface”. The format is largely just a binary blob with a header derived from DirectDraw 7 structures. While DirectDraw itself has passed into the land of ‘legacy’ API, the file format itself lives on to store any number of hardware and API-specific data used as resources in rendering.
The DirectX SDK (August 2009) release was our “RTM” release for DirectX 11 and includes the final versions of headers, link libraries, deployment details, and samples for shipping DirectX 11 applications. The Direct3D 11 Deployment for Game Developers article details most everything you need to know to handle the DirectX 11 dependency for your application. Windows 7 and Windows Server 2008 R2 already include the runtime, although if you make use of HLSL at runtime or D3DX, you’ll still need to use DirectSetup to deploy those components as they are not included in the OS–be sure to see DirectX Installation for Game Developers. DirectX 11 is available on Windows Vista and Windows Server 2008 through KB 971644 as explained in detail in the article.
Gamefest has traditionally been held as a public event, but if you’ve tried registering for this year’s conference you will notice that registration requires a username and password. Gamefest serves as the primary development conference for professional Windows game developers as well Xbox 360 registered developers and other Microsoft gaming platforms. This year with so much interest around Project Natal (ed: now publicly known as “Microsoft Kinect”) it was decided to make the event confidential. Only registered developers will be in attendance.
Over the past year or so, one of my projects has been the XNAMath library which shipped for the first time to Windows developers in the DirectX SDK (March 2008). XNAMath began life back in 2004 as “xboxmath” for the Xbox 360, and was originally developed by the Xbox 360 graphics team. The original implementation was a scalar version, which is retained today as the
NO_INTRINSICS codepath, and then extended with a VMX128 optimized codepath–VMX128 is the Xbox 360 SIMD instruction set, a variant of PowerPC AltiVec. In late 2008/early 2009, we extended it again for SSE2 to provide optimized cross-platform support with Windows x86 and Windows x64 and XNAMath is the result of this work. Incidentally, this is why XNAMath’s version number is 2.0 since it is “xboxmath 2.0” from the perspective of Xbox 360 developers.
After 5 years of focusing on game developer relations at Microsoft, I recently accepted a new position as the Lead Developer for the DirectX SDK. My work in the XNA Developer Connection group has included numerous contributions to the DirectX SDK over the past few years, particularly samples and whitepapers, as well as keeping up various utilities and getting XNAMath shipped as a new cross-platform C++ SIMD library in both the Xbox 360 XDK and DirectX SDK. As such, the new role seems like a natural shift in focus rather than an entirely new job.