Games for Windows and the DirectX SDK blog

Technical tips, tricks, and news about game development for Microsoft platforms including desktop, Xbox, and UWP


Project maintained by walbourn Hosted on GitHub Pages — Theme by mattgraham
Posts by Tag | Posts by Month | About | RSS

See also - DirectX Developer Blog | DirectX Landing Page | C++ Team Blog

Vcpkg now supports targeting Xbox

The Vcpkg C++ library manager now supports targeting the Xbox platform using four new ‘community triplets’. This makes it easy for Xbox registered developers to take advantage of the thousands of open-source C++ libraries supported by vcpkg, and build them in a way that is compatible with the Xbox Game OS. This also provides a mechanism for open-source library maintainers to validate that their code will build against the WINAPI_FAMILY_GAMES partition used on Xbox.

Read More

vcpkg and GitHub Update

Over the summer I’ve made a few improvements to my GitHub project’s CMake support and vcpkg C++ Package Manager integration. In addition to updating for the July 2022 releases of DirectX Tool Kit DX11 / DX12, DirectXTex, DirectXMesh, and UVAtlas, I’ve done some work on some related vcpkg ports as well, which I’ve summarized in this blog post.

Read More

Advanced Format drives and Async I/O

One of the on-going challenges for shipping games on PC is the constant evolution of the platform. Each time a game or application makes an assumption about how the system works, it becomes a potential bug when those assumptions change. Recently I encountered one of those changing assumptions: the sector size to use for non-buffered asynchronous I/O.

Read More

DirectX Tool Kit Vertex Skinning Update

Back when I first implemented the Model class for DirectX Tool Kit, I was focused on having some basic mesh rendering for samples and demos. As such, while I supported creating SkinnedEffect materials for models with vertex bone information, I didn’t have much else there to support implementing vertex skinning animation, or even rigid-body animation. I have been meaning to get back finishing that work for 5+ years.

October is Hackathon time for Microsoft, so I went back and dusted off a bunch of prototype work over the years and finally got it implemented.

Read More

DirectXMath AVX and AVX2 - A Coda

Over the years, I’ve done a number of optimizations for DirectXMath using advanced instruction sets available on x86/x64 CPUs. For Xbox developers, making the choice to use these is very easy since you can count on them along with AVX. For PC developers, modern x64 development means you can rely on SSE, SSE2–and at this point, SSE3–without sacrificing any target market. I’ve recently done some work for another project unrelated to DirectMath per se, but I wanted to add some notes about using other advanced instruction sets.

Read More

DirectXMath 3.16

DirectXMath 3.16 is now available via GitHub, NuGet, and vcpkg. It is included in the Windows 10 SDK (20348), version 2104

Note that the GitHub, vcpkg, and NuGet links above point to DirectXMath 3.16b which is a hot-fixed version compared to the Windows 10 SDK (20348) copy of DirectXMath 3.16. This includes a few minor syntax fixes to support clang/LLVM and GNUC for the ARM64 platform. There are no functional differences.

The Windows SDK for Windows 11 (10.0.22000) includes the updated 3.16b version.

Read More

D3DX_DXGIFormatConvert.inl - Back from the dead

In the DirectX SDK (June 2010) release, there was this release note:

The new D3DX_DXGIFormatConvert.inl inline header includes light-weight conversion functions for use in Compute Shaders or Pixel Shaders on D3D11 Hardware that can be useful when applications need to simultaneously read and write to textures, such as in-place editing scenarios.

A number of developers found it useful, including Tom Forsyth. Unfortunately, the header more or less disappeared after that. This Microsoft Docs Programming Guide page mentions the header, and there are detailed Reference Guide pages, but they all failed to mention where to find it…

Read More

Legacy D3DX on NuGet

If you’ve been following this blog for any period of time, you know that much of it has been spent explaining the deprecated nature of the legacy DirectX SDK, and the options for avoiding the need for it. For Direct3D 11 or later, there’s plenty of good replacement options that are open source, written in modern C++, and simple to include without using a legacy redist solution. Despite all that, there are still some scenarios where D3DX9, D3DX10, and/or D3DX11 are a necessity. There’s now a new option for using D3DX that avoids the need for both the legacy DirectX SDK and the DirectX End-User Runtime (DXSETUP): The Microsoft.DXSDK.D3DX NuGet package (dxsdk-d3dx on vcpkg).

Read More

Where is the DirectX SDK (2021 Edition)?

Microsoft announced last year that it was retiring all SHA-1 signed content from Microsoft Downloads in this blog post since the SHA-1 algorithm is no longer considered secure. The original timeline was stretched out a bit due to COVID-19, but as of January 2021 this content is no longer hosted by Microsoft servers.

This impacted the legacy DirectX SDK, the DirectX End-User Runtime, and the DirectX End-User Runtime Web Installer. In January 2021 they were removed from the Microsoft Download Center. As of February 20, 2021, these three downloads have been republished using SHA-256 signing for the ‘outer’ containers–there’s been no change to the contents or binaries. The payload DLLs are still using SHA-1, and there are known security issues, so it is highly recommended you move to the replacements mentioned in this post.

Read More

DirectXTex, DirectXMesh and UVAtlas now support Linux

At BUILD 2020 last year, Microsoft gave an update on Windows Subsystem for Linux, along with an announcement about DirectX coming to WSL. As part of that effort, there are now DirectX 12 headers available under the MIT license on GitHub including support for building on Linux. Over the winter break, I took a little time to dig into WSL, the C++ vcpkg package manager, and–since I got a Surface Pro X for Christmas–I could even try out WSL for both x64 and ARM64.

Read More

The Many Faces of D3DX12

The “DirectX Utility Library” (a.k.a. D3DX) has a long and complex history, which has resulted in a lot of confusion for developers. A key design point for D3DX is that it’s not meant to be “required”, and started life as a way to simplify DirectX programming for new developers. The library was it’s most “feature rich” with D3DX9 with helpers for sprite rendering, drawing text, 3D graphics linear algebra math, loading/saving textures in bitmaps, image resizing & format conversion, DXT texture codecs, tangent frame & mipmap generation, the HLSL compiler, an effects (FX) system, shader reflection, a model & animation system, and a slew of other technology projects such as progressive mesh (p-mesh), vertex cache optimization, isochart texture atlasing, and Precomputed Radiance Transfer (RPT) using Spherical Harmonics.

In other words it became an untenable mess of closed-source software that you couldn’t really avoid, rife with potential security risks, which had a complex servicing and deployment story. From the lessons of those years, the DirectX team took a very different approach for D3DX for DirectX 12, a.k.a. D3DX12.

Read More

The Care and Feeding of Modern Swap Chains (part 3)

In part 1, I covered the split between “blt-style” and “flip-style” swap effects, and in particular the handling of gamma-correct rendering. In part 2 I addressed implementing MSAA. In this post I’ll cover fullscreen rendering, which these days is actually a lot more complicated a topic than it first appears.

Read More

The Care and Feeding of Modern Swap Chains (part 1)

The original idea for Microsoft DirectX Graphics Infrastructure (DXGI) was to factor out creating swapchains and enumerating monitor resolutions from the evolution of Direct3D, and that DXGI would be basically the same for a long time. Alas, in practice that’s not remotely true, and DXGI has changed with every update of Direct3D and/or Windows. As a result, the “right” way to use DXGI has changed as well. The basic recommendations on Microsoft Docs are still a good place to start, but there are a number of important areas that need more explanation.

Read More

DirectX Caps Viewer Update

The DirectX Capabilities Viewer utility dates back to the DirectX 5 era, which was written to help developers review the myriad “caps bits”, resolutions, and devices supported by DirectX components. It shipped in the legacy DirectX SDK, and then moved to the Windows 8.0 SDK, Windows 8.1 SDK, and ships in the Windows 10 SDK today.

This post covers some recent developments with this tool.

Read More

Modern C++ Bitmask types

Bitmask flags are a ubiquitous pattern in C & C++ code. In the ‘old days’, they were typically defined as:

#define FLAGS_NONE             0x0
#define FLAGS_DO_A_THING       0x1
#define FLAGS_DISABLE_A_THING  0x2
#define FLAGS_OPTIONAL_FEATURE 0x4

HRESULT MyFunction(int flags);

Since C/C++ preprocessor defines tend to have a lot of potential hazards, over time developers have moved to using enum:

enum FLAGS_FOR_MYFUNCTION
{
    FLAGS_NONE             = 0x0,
    FLAGS_DO_A_THING       = 0x1,
    FLAGS_DISABLE_A_THING  = 0x2,
    FLAGS_OPTIONAL_FEATURE = 0x4
};

HRESULT MyFunction(int flags);

With C++11 you can also provide an underlying type of the enum so you can use unsigned long instead of int without any signed/unsigned mismatch warnings:

enum FLAGS_FOR_MYFUNCTION : unsigned long
{
    FLAGS_NONE             = 0x0,
    FLAGS_DO_A_THING       = 0x1,
    FLAGS_DISABLE_A_THING  = 0x2,
    FLAGS_OPTIONAL_FEATURE = 0x4
};

HRESULT MyFunction(unsigned long flags);

This still leaves the use of flags ‘loosely typed’ since if you had a second set of (possibly unrelated) flags you can easily write:

HRESULT MyFunction(FLAGS_DO_A_THING | UNRELATED_FLAGS_FEATURE);

Modern C++ recommends solving this with Bitmask flags per the standard (section 17.5.2.1.3). DirectX 11 used the older loosely typed DWORD (a.k.a unsigned long) plus enum flags, but DirectX 12 adopts this new typed bitmask flags pattern. Therefore, I’ve updated my GitHub libraries to use the pattern as well, and this does have some implications for existing code.

Read More

GDC without the GDC

With the increasing seriousness of the COVID-19 situation across the globe, many gamer and game developer events are getting postponed or cancelled. That said, there are some digital events taking place instead that you may find informative:

Read More

GitHub 2020

I’ve done my first releases of 2020 of my various GitHub projects, and there’s a number of changes worth mentioning. This includes updates to DirectX Tool Kit for both DX11 and DX12, DirectXTex, DirectXMesh, and UVAtlas, as well as a number of changes to my NuGet packages in particular.

Read More

Twilight for Windows 7

As a reminder, Windows 7 end-of-life for consumer is fast approaching on January 14, 2020. There are enterprises that will have on-going support contracts, but officially for consumers that’s the end of the road. There are of course a number of gamers still running Windows 7–thankfully according to the Valve Steam Hardware Survey they are almost all running 64-bit–, and it will remain important in some markets for some time to come. So, here are a few tips for developers still needing to support Windows 7.

Read More

Welcome to GitHub Pages

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.

Read More

DirectXMath - ARM64

The Visual Studio 2017 (15.9 update) now supports the ARM64 architecture for the Universal Windows Platform (UWP) apps.

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.

Read More

VS 2017 (15.9 update)

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.

Read More

DirectXMath 3.13

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.

Read More

VS 2017 (15.8 update)

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.

Read More

VS 2017 (15.7 update)

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.

Read More

DirectXMesh Update

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.

Read More

VS 2017 (15.5 update)

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.

Read More

CodePlex vs. GitHub

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.

Read More

Visual Studio 2017 (15.3) update

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).

Read More

HDR Lighting and Displays

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.

Read More

DirectX Tool Kit and C++/WinRT

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 /ZW).

Read More

DirectXTex and DirectXMesh now support Direct3D 12

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.

Read More

Getting Started with Direct3D 12

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.

Read More

Windows 10 Anniversary Update SDK

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.

Read More

Direct3D Game Visual Studio templates (Redux)

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.

Read More

Known Issues - XAudio 2.7

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.

Read More

DirectX Tool Kit - Keyboard and Mouse support

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.

Read More

DirectXMath - AVX2

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.

Read More

Samples Content Exporter

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.

Read More

GitHub

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.

Read More

The Zombie DirectX SDK

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.

Read More

GDC 2015

Presentations for our Game Developer Conference content from this year were recorded and are available now on Channel 9.

Read More

Direct3D Win32 Game Visual Studio template

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.

Read More

Known Issues - DirectXMath 3.06

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.

Read More

Understanding Game Time Revisited

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.

Read More

UVAtlas - Return of the Isochart

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 CodePlexGitHub. 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.

Read More

DirectX Tool Kit - Now with GamePads

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.

Read More

DirectXMesh

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.

Read More

Book Recommendations

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.

Read More

BUILD 2014

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.

Read More

Anatomy of Direct3D 11 Create Device

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.

Read More

CodePlex VS 2013 Refresh

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.

Read More

A Brief History of Windows SDKs

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?

Read More

DirectX SDK Samples Catalog

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 SDK being included with Visual Studio). 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.

Read More

DXUT for Win32 Desktop Update

With the deprecation of the DirectX SDK (see Where is the DirectX SDK?), 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.

Read More

Manifest Madness

This blog post discusses Application Manifest elements for use in Win32 desktop applications. This is not about the App package manifest (aka AppX) used for Windows Store apps for Windows 8.x, UWP, Centennial Desktop Bridge, Xbox One XDK, or the Microsoft GDK.

User Account Control

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:

Read More

Living without D3DX

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.

Read More

DirectXTex and Effects 11 Update

DirectXTex

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.

Read More

DirectXTex Update

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.

Read More

Known Issues - DirectXMath 3.03

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.

Read More

DirectX 11.1 and Windows 7 Update

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.

Read More

DirectXTK Update

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.

Read More

Game Rating Systems and Windows 7

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.

Read More

Direct3D SDK Debug Layer Tricks

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.

Read More

Effects for Direct3D 11 Update

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?), 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.

Read More

Dual-use Coding Techniques for Games, part 3

Writing shared code for Windows Store, Xbox One, Universal Windows Platform (UWP) apps, and Win32 desktop apps

(continued from part 1 and part 2)

Windows Runtime (WinRT) APIs

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.

Read More

Dual-use Coding Techniques for Games, part 2

Writing shared code for Windows Store, Xbox One, Universal Windows Platform (UWP) apps, and Win32 desktop apps

(continued from part 1)

Win32 APIs

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.

Read More

Dual-use Coding Techniques for Games, part 1

Writing shared code for Windows Store, Xbox, Universal Windows Platform (UWP) apps, and Win32 desktop apps

Introduction

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.

Read More

DirectXMath - F16C and FMA

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.

Read More

DirectXMath - AVX

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.

Read More

DirectXMath - SSE4.1 and SSE4.2

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.

Read More

DirectXMath - SSE3 and SSSE3

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.

Read More

DirectXMath - SSE, SSE2, and ARM-NEON

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.

Read More

DirectX SDKs of a certain age

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.

Read More

Spherical Harmonics Math

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.

Read More

Direct3D Feature Levels

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 CheckFormatSupport or 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.

Read More

Visual Studio 2012 Release Candidate

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.

Read More

Windows 8.x and GDFs

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.

Read More

Learning XAudio2

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.

Read More

HLSL, FXC, and D3DCompile

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.

Read More

XINPUT and XAudio2

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.

Read More

XDSP.H - Digital Signal Processing helper functions

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.

Read More

XINPUT and Windows 8

Windows 8.x and Windows 10 include version 1.4 of the XInput API for use with Xbox 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 8.x/10 SDK. Windows 8 or later also includes an updated driver for these devices, XUSB22.SYS.

Read More

Samples Content Exporter Update

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.

Read More

Where's DXERR.LIB?

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, DXERR8.LIB and 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 DXERR.LIB.

Read More

XAudio2 and Windows 8

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.

Read More

Introducing DirectXMath

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”

Read More

Desktop Games on Windows 8.x

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.

Read More

Where is the DirectX SDK?

See “Where is the DirectX SDK (2021 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.

Read More

DirectXTK

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.

Read More

Visual Studio 11 Beta

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).

Read More

Known Issue - DirectX SDK (June 2010) Setup and the S1023 error

Note that the DirectX SDK is deprecated. See “Where is the DirectX SDK (2021 Edition)?” for details.

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.

Read More

Visual Studio 11 Developer Preview

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).

Read More

Windows Networking

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.

Read More

TiledResources11

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.

Read More

DirectXTex

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.

Read More

BC6HBC7EncoderDecoder Sample Update

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.

Read More

Game Developer Conference 2011 Presentations Posted

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:

Read More

Visual C++ Runtime Update

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.

Read More

DXSETUP Update

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).

Read More

XNA Math Version 2.04

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.

Read More

Windows 7 Service Pack 1

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.

Read More

Known Issues in XNAMath v2.03

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 xnamathvector.inl file.

Read More

Known Issue - TexconvEx

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.

Read More

Windows x64

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.

Read More

DirectX and .NET

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.

Read More

Known Issue - D3D11InstallHelper sample

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.

Read More

June 2010 HLSL Compiler Issue with Tessellation

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.

Read More

Goodbye to an old friend...

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.

Read More

Not So Direct Setup

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.

Read More

Direct3D 11 Multithreading

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:

Read More

Who moved my Windows Media Cheese?

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.

Read More

Direct3D 11 Tessellation

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:

Read More

DDSWithoutD3DX Sample Update

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 DDS.H header.

Read More

Games for Windows Update

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.

Read More

Whither DirectDraw?

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…

Read More

Gamefest 2010 Presentations Posted

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.

Read More

Windows SDK 7.1

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.

Read More

DirectX 11 Hardware Vendor Differences

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.

Read More

Announcement - DirectX SDK (June 2010) is live

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.

Note: The DirectX SDK is now legacy. You should use the Windows 10 SDK instead.

Read More

What's up with D3DCompiler_xx.DLL?

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.

Read More

Object Naming

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.

Read More

Visual Studio 2010 shipped!

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.

Read More

Game Developer Conference 2010

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.

Read More

What's in a version number?

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 testing 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.

Read More

DirectX SDK (February 2010) is live

The DirectX SDK (February 2010) release is live on [Microsoft downloads](https://www.microsoft.com/en-us/download/details.aspx?id=10084). See that page for full release notes.
Read More

The DDS File Format Lives

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.

Read More

Direct3D 11 on Windows Vista with WSUS

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.

Read More

Gamefest 2010

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.

Read More

A little love for XNAMath...

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.

Read More

Welcome

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.

Read More