Skip to content
Chuck Walbourn edited this page Dec 5, 2022 · 83 revisions

http://go.microsoft.com/fwlink/?LinkId=248926

GitHub All Releases GitHub Release Date

Nuget UWP Nuget Win32 Nuget Win10 Nuget VS 2017

GitHub last commit Code size

Azure DevOps VS 2019 Azure DevOps VS 2022 Azure DevOps GDK

Azure DevOps CMake Azure DevOps CMake Latest

Azure DevOps WSL Azure DevOps WSL Azure DevOps MinGW

Azure DevOps test suite build Azure DevOps test suite build

DirectX Logo DirectXTex, a shared source library for reading and writing .DDS files, and performing various texture content processing operations including resizing, format conversion, mip-map generation, block compression for Direct3D runtime texture resources, and height-map to normal-map conversion. This library makes use of the Windows Image Component (WIC) APIs. It also includes simple .TGA and .HDR readers and writers since these image file format are commonly used for texture content processing pipelines, but are not supported by a built-in WIC codec.

See this blog post for an overview.

DirectXTex library

Texconv utility

Texassemble utility

Texdiag utility

DDSView sample

Image formats

Resources

NuGet

DirectXTex is also available from the NuGet Gallery:

vcpkg C++ Package Manager

DirectXTex has a vcpkg installation port as well.

Porting from D3DX

See this post for a complete listing of D3DX equivalents.

DirectXTex vs. DirectX Tool Kit

The DirectXTex library is designed a full-featured texture processing library that includes a sophisticated DDS file reader. This reader can handle numerous legacy formats and automatically performs required conversions. This makes it extremely useful in tools and content pipelines, but is far more code that is really needed for a game or application at runtime that loads 'cooked' textures.

Instead, a game or application should make use of DDSTextureLoader (DX9 / DX11 / DX12) and/or WICTextureLoader (DX9 / DX11 / DX12). These modules provide light-weight versions of texture creation from .dds, .bmp, .png, .gif, .jpg, .tif, and JPEG-XR / HD Photo files. ScreenGrab (DX9 / DX11 / DX12) is a light-weight screenshot capture utility for writing out the same file types.

These modules are included in DirectX Tool Kit (DX11 and DX12), and there are 'standalone' versions available in the DirectXTex distribution as well.

See Direct3D 11 Textures and Block Compression

Xbox

The xtexconv sample also includes some auxiliary platform-specific functionality for Xbox One XDK / Microsoft GDKX development, which are visible in the xbox branch. This includes functions for tiling & de-tiling textures, and a variant .DDS file reader/writer for storing tiled textures. The DirectX Tool Kit includes the XboxDDSTextureLoader DX11 / DX12 for using placement texture creation using this DDS file variant.

IHV compressors

The various video independent hardware vendors (IHVs) have their own texture toolsets as well.

Note that the NVIDIA tools haven't been updated in some time, and are currently missing support for the DX10 header extension, BC6H, and BC7.

Support

For questions, consider using Stack Overflow with the directxtk tag, or the DirectX Discord Server in the dx12-developers or dx9-dx11-developers channel.

For bug reports and feature requests, please use GitHub issues for this project.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Credits

The DirectXTex library is the work of Chuck Walbourn, with contributions from Matt Lee, Xin Huang, Craig Peeper, and the numerous other Microsoft engineers who developed the D3DX utility library over the years.

Thanks to Paul Penson for his help with the implementation of MemoryStreamOnBlob.

For Use

  • Universal Windows Platform apps
  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Windows 7 Service Pack 1
  • Xbox One
  • Xbox Series X|S
  • Windows Subsystem for Linux

Architecture

  • x86
  • x64
  • ARM64

For Development

  • Visual Studio 2022
  • Visual Studio 2019 (16.11)
  • clang/LLVM v12 - v18
  • GCC 10.5, 11.4, 12.3
  • MinGW 12.2, 13.2
  • CMake 3.20

Related Projects

DirectXTex Rust bindings

DirectX Tool Kit for DirectX 11

DirectX Tool Kit for DirectX 12

DirectXMesh

DirectXMath

Tools

Test Suite

Content Exporter

DxCapsViewer

See also

DirectX Landing Page

Clone this wiki locally