NEWS: This project is now hosted on GitHub https://github.com/Microsoft/DXUT. This site is being maintained for now, but please move to using GitHub. https://github.com/Microsoft/DXUT/wiki/DXUT

http://blogs.msdn.com/b/chuckw/archive/2013/09/16/dxut-for-win32-desktop-update.aspx

Differences from the original DXUT11

  • DXUT11 now makes use of the Standard C++ Library; no longer includes CGrowableArray or CDXUTStack
  • All math functionality uses DirectXMath instead of legacy D3DXMath
http://blogs.msdn.com/b/chuckw/archive/2012/03/27/introducing-directxmath.aspx
  • Includes new helpers to replace common deprecated D3DX usage: DXUTCompileFromFile, DXUTCreateShaderResourceViewFromFile, DXUTCreateTextureFromFile, DXUTSaveTextureToFile
  • This version only supports Direct3D 11. It has no support for Direct3D 9 or Windows XP. The following API elements are therefore no longer in DXUT11:
    • DXUTDevice9.h/.cpp
    • struct DXUTD3D9DeviceSettings
    • enum DXUTDeviceVersion
    • callbacks LPDXUTCALLBACKISD3D9DEVICEACCEPTABLE, LPDXUTCALLBACKD3D9DEVICECREATED, LPDXUTCALLBACKD3D9DEVICERESET, LPDXUTCALLBACKD3D9FRAMERENDER, LPDXUTCALLBACKD3D9DEVICELOST, LPDXUTCALLBACKD3D9DEVICEDESTROYED
    • DXUTSetCallbackD3D9DeviceAcceptable, DXUTSetCallbackD3D9DeviceCreated, DXUTSetCallbackD3D9DeviceReset, DXUTSetCallbackD3D9FrameRender, DXUTSetCallbackD3D9DeviceLost, DXUTSetCallbackD3D9DeviceDestroyed
    • DXUTSetD3DVersionSupport. DXUTGetD3D9Object, DXUTGetD3D9Device, DXUTGetD3D9PresentParameters, DXUTGetD3D9BackBufferSurfaceDesc, DXUTGetD3D9DeviceCaps, DXUTGetD3D9DeviceCaps, DXUTDoesAppSupportD3D9, DXUTIsAppRenderingWithD3D9
    • DXUTIsD3D11Available, DXUTDoesAppSupportD3D11, DXUTIsAppRenderingWithD3D11
    • DXUTSnapD3D9Screenshot, DXUTD3DFormatToString, DXUTConvertDeviceSettings11to9, DXUTConvertDeviceSettings9to11, ConvertFormatD3D9ToDXGI, ConvertFormatDXGIToD3D9, DXUTTraceDecl, DXUTTraceD3DDECLUSAGEtoString, DXUTTraceD3DDECLMETHODtoString, DXUTTraceD3DDECLTYPEtoString
    • DXUTCreateRefDevice9
    • CDXUTXFileMesh
  • DXUT11 no longer uses the legacy DXERR.LIB or DXERR9.LIB. It includes a copy of the standalone DxErr.
http://blogs.msdn.com/b/chuckw/archive/2012/04/24/where-s-dxerr-lib.aspx
  • Removed legacy functionality: DXUTReLaunchMediaCenter, SDKWaveFile.h/.cpp, SDKSound.h/.cpp
  • The #define DXUT_VERSION indicates the release version as a decimal number.

Building

This code is designed to build with Visual Studio 2012 or later. It requires Direct3D 11 headers from the Windows 8.x SDK. Visual Studio 2012 or later includess the Windows 8.x SDK.

This library has been updated to work without requiring any content from the DirectX SDK. For details, see "Where is the DirectX SDK"? and "Where is the DirectX SDK (2013 Edition)?"

http://msdn.microsoft.com/en-us/library/ee663275.aspx
http://blogs.msdn.com/b/chuckw/archive/2013/07/01/where-is-the-directx-sdk-2013-edition.aspx

Adding to a VS solution

You can either use the Add References feature to reference the DXUT vcxproj files in your solution, or more commonly you just add the various DXUT files directly to your project. By convention, they are put into a "DXUT" filter and this includes both Core and Optional content--only Core is 'required'.
  • DXUT_2015_Win10 is for Windows desktop applications building with VS 2015 with the Windows 10 SDK.
  • DXUT_2015 is for Windows desktop applications building with VS 2015.
  • DXUT_2013 is for Windows desktop applications building with VS 2013 Express for Desktop, VS 2013 Community, VS 2013 Professional or higher.
  • DXUT_2012 is for Windows desktop applications building with VS 2012 Express for Desktop, VS 2012 Professional or higher
In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Plaforms", and then add the path $(SolutionDir)\DXUT\Core;$(SolutionDir)\DXUT\Optional; to the Additional Include Directories properties. Click Apply.

http://blogs.msdn.com/b/vcblog/archive/2010/05/03/flexible-project-to-project-references.aspx

Direct3D 11.1

If Direct3D 11.1 is supported on the platform at runtime, DXUT will have a Direct3D 11.1 device and immediate device context available for use. If the system only supports DirectX 11.0, these two interface pointers will be null.

auto dev1 = DXUTGetD3D11Device1();
auto context1 = DXUTGetD3D11DeviceContext1();

if ( dev1 )
    // platform supports DirectX 11.1 or later

DirectX 11.1 is supported on Windows 8.0 or later, and Windows 7 Service Pack 1 with KB2670838 installed. Note that DirectX 11.1 specific hardware features including Feature Level 11.1 are only available on Windows 8.x.

http://msdn.microsoft.com/en-us/library/hh404562.aspx
http://msdn.microsoft.com/en-us/library/jj863687.aspx
http://support.microsoft.com/kb/2670838
http://blogs.msdn.com/b/chuckw/archive/2013/02/26/directx-11-1-and-windows-7-update.aspx
http://blogs.msdn.com/b/chuckw/archive/2012/11/14/directx-11-1-and-windows-7.aspx

Direct3D 11.2

DXUT support for Direct3D 11.2 is optional since it requires the Windows 8.1 SDK. To enable this support, add a PreprocessorDefine to your VS 2013 project USE_DIRECT3D11_2.

If Direct3D 11.2 is supported on the platform at runtime, DXUT will have a Direct3D 11.2 device and immediate device context available for use. If the system only supports DirectX 11.0 or 11.1, these two interface pointers will be null.

auto dev2 = DXUTGetD3D11Device2();
auto context2 = DXUTGetD3D11DeviceContext2();

if ( dev2 )
    // platform supports DirectX 11.2 or later

DirectX 11.2 is supported on Windows 8.1. The primary feature it provides is Tiled Resources.

http://msdn.microsoft.com/en-us/library/windows/desktop/dn312084.aspx

Direct3D 11.3

DXUT support for Direct3D 11.3 is optional since it requires the Windows 10 SDK. To enable this support, add a PreprocessorDefine to your VS 2015 project USE_DIRECT3D11_3.

If Direct3D 11.3 is supported on the platform at runtime, DXUT will have a Direct3D 11.3 device and immediate device context available for use. If the system only supports DirectX 11.0, 11.1, or 11.2, these two interface pointers will be null.

auto dev3 = DXUTGetD3D11Device3();
auto context3 = DXUTGetD3D11DeviceContext3();

if ( dev3 )
    // platform supports DirectX 11.3 or later

DirectX 11.3 is supported on Windows 10.

https://msdn.microsoft.com/en-us/library/windows/desktop/dn914596.aspx

Using in combination with DirectXTK

This updated version of DXUT11 includes copies of the standalone modules DDSTextureLoader, WICTextureLoader, and ScreenGrab to provide support previously provided by the deprecated D3DX11 library. These modules are also present in the DirectX Tool Kit library. If you are using both DXUT and DirectXTK in the same project, you need to remove these three modules (DDSTextureLoader.h, DDSTextureLoader.cpp, ScreenGrab.h, ScreenGrab.cpp, WICTextureLoader.h, and WICTextureLoader.cpp) from DXUT\Core to avoid link errors or header-mismatch.

Removing the DXUT\Optional\SDKmesh.* files is also recommended. Use the DirectXTK Model class instead.

You need to add the DirectXTK\Inc folder to the Additional Includes search path for DXUT.

http://go.microsoft.com/fwlink/?LinkId=248929
http://code.msdn.microsoft.com/DXUTDirectXTK-Simple-Win32-9cf797e9

Note that DXUT uses left-handed view coordinates. Many aspects of DirectXTK default to right-handed view coordinates, but can be made to work with left-handed as well.

Dependencies

The DXUT library requires the D3DCompile DLL to be present at runtime.

http://blogs.msdn.com/b/chuckw/archive/2012/05/07/hlsl-fxc-and-d3dcompile.aspx
  • When using the Windows 8.1 SDK and targeting only Windows 8.1, you can rely on the D3DCompile_47.DLL to be present on the system as part of the OS image.
  • When using the Windows 8.x SDK and targeting Windows Vista or later, you can include the D3DCompile_46.DLL or D3DCompile_47.DLL side-by-side with your application copying the file from the REDIST folder.
%ProgramFiles(x86)%\Windows kits\8.0\Redist\D3D\arm, x86 or x64

%ProgramFiles(x86)%\Windows kits\8.1\Redist\D3D\arm, x86 or x64

DXUT makes use of LOAD_LIBRARY_SEARCH_SYSTEM32 which requires KB 2533623 to be installed (already included with Windows Vista Service Pack 2 and Windows 7 Service Pack 1).
http://support.microsoft.com/kb/2533623

When creating a device with the D3D11_CREATE_DEVICE_DEBUG flag, you must have the correct version of the SDKDebugLayer installed on your system for your OS.
http://blogs.msdn.com/b/chuckw/archive/2012/11/30/direct3d-sdk-debug-layer-tricks.aspx

Release Notes

  • DXUT currently requires that Font.DDS be available in the Media\UI folder. DXUTControls.DDS is not actually read at runtime, but is included for completeness.

Last edited Jul 29, 2015 at 11:53 PM by walbourn, version 39