1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-09 14:30:05 +00:00
10 DirectXTexXbox
Chuck Walbourn edited this page 2024-08-19 16:32:39 -07:00
DirectXTex

For Microsoft GDK with Xbox Extensions and the legacy Xbox One XDK, there are a number of Xbox extension functions for rearranging textures for the target hardware offline. This functionality is available with the official samples and hosted in the Auxiliary folder on GitHub.

The xtexconv sample for the GDKX or XDK is a variant of the texconv command-line tool that uses these extensions.

These extensions are only usable by Xbox registered developers via the NDA SDKs since it uses a private library.

Legacy Xbox One XDK support has been retired.

Header

#include "DirectXTexXbox.h"

Namespace

All the functions in the library are in the Xbox C++ namespace.

Functions

  • GetMetadataFromDDSMemory, LoadFromDDSMemory, LoadFromDDSFile, SaveToDDSMemory, SaveToDDSFile, EncodeDDSHeader - Variants of the DDS I/O Functions that write the tiled/detiled versions of data in a custom DDS variant.

  • Tile - Converts 'standard' to 'tiled' textures

  • Detile - Converts 'tiled' to 'standard' textures

  • CreateTexture, CreateShaderResourceView - Variants that use placement creation of textures with tiled/detiled data.

  • FreeTextureMemory - Releases memory allocated by these variants. Helper for creating your own DDS files

Structures

XboxImage is a variant of Image with additional metadata.

Adding to a VS solution

Using project-to-project references

In your application's solution, right-click on the Solution and use "Add \ Existing Project..." to add the appropriate .vcxproj file to your solution.

DirectXTex_GDK_2022 For the Gaming.Xbox.*.x64 platforms, this project includes the extension functions.
DirectXTex_GXDK_PC_2022 This project is a variant of DirectXTex_Desktop_2022 that includes the extensions for PC-hosted content tools for Microsoft GDKX development.
DirectXTex_GDK_2019 For the Gaming.Xbox.*.x64 platforms, this project includes the extension functions.
DirectXTex_GXDK_PC_2019 This project is a variant of DirectXTex_Desktop_2019 that includes the extensions for PC-hosted content tools for Microsoft GDKX development.

Dependencies

These functions make use of the XG Library.