[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-microsoft-directxtk12-usage":3,"mdc-1y86t9-key":42,"related-org-microsoft-directxtk12-usage":2195,"related-repo-microsoft-directxtk12-usage":2392},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":37,"sourceUrl":40,"mdContent":41},"directxtk12-usage","integrate DirectX Tool Kit for DirectX 12","Guide for integrating DirectX Tool Kit for DirectX 12 into new projects and understanding the library's API surface. Use this skill when asked about how to use DirectXTK12, set up a new project, or get an overview of available classes and functionality.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"microsoft","Microsoft","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fmicrosoft.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"Graphics","graphics","tag",{"name":17,"slug":18,"type":15},"Game Development","game-development",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"C#","c",1738,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12","2026-07-03T16:32:07.674268","MIT",463,[29,30,31,32,33,14,8,34,35,36],"cpp-library","desktop","directx","directx-12","directxtk","shaders","uwp","xbox",{"repoUrl":24,"stars":23,"forks":27,"topics":38,"description":39},[29,30,31,32,33,14,8,34,35,36],"The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Ftree\u002FHEAD\u002Fskills\u002Fdirectxtk12-usage","---\nname: directxtk12-usage\ndescription: >-\n  Guide for integrating DirectX Tool Kit for DirectX 12 into new projects and understanding the library's API surface.\n  Use this skill when asked about how to use DirectXTK12, set up a new project, or get an overview of\n  available classes and functionality.\nlicense: MIT\nmetadata:\n  author: chuckw\n  version: \"1.0\"\n---\n\n# DirectX Tool Kit for DirectX 12 — Usage Guide\n\n## Overview\n\nThe *DirectX Tool Kit for DirectX 12* (DirectXTK12) is a collection of helper classes for writing Direct3D 12 C++ code for Win32 desktop applications (Windows 10+), Xbox Series X|S, Xbox One, and Universal Windows Platform (UWP) apps.\n\n- **Repository**: \u003Chttps:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12>\n- **Documentation**: \u003Chttps:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Fwiki>\n- **NuGet Packages**: `directxtk12_desktop_win10`, `directxtk12_uwp`\n- **vcpkg Port**: `directxtk12`\n\n## Integration Methods\n\n### vcpkg manifest-mode (Recommended)\n\nIn your `vcpkg.json` file, add the following:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Fvcpkg-tool\u002Fmain\u002Fdocs\u002Fvcpkg.schema.json\",\n  \"dependencies\": [\n    \"directx-headers\",\n    \"directxmath\",\n    \"directxtk12\"\n  ]\n}\n```\n\nIf using GameInput for the game input functionality, add the following:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Fvcpkg-tool\u002Fmain\u002Fdocs\u002Fvcpkg.schema.json\",\n  \"dependencies\": [\n    \"directx-headers\",\n    \"directxmath\",\n    {\n      \"name\": \"directxtk12\",\n      \"default-features\": false,\n      \"features\": [\n        \"gameinput\"\n      ]\n    }\n  ]\n}\n```\n\nIf using DirectX Tool Kit for Audio and GameInput, add the following:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Fvcpkg-tool\u002Fmain\u002Fdocs\u002Fvcpkg.schema.json\",\n  \"dependencies\": [\n    \"directx-headers\",\n    \"directxmath\",\n    {\n      \"name\": \"directxtk12\",\n      \"default-features\": false,\n      \"features\": [\n        \"gameinput\",\n        \"xaudio2-9\"\n      ]\n    }\n  ]\n}\n```\n\n### vcpkg (classic)\n\n```bash\nvcpkg install directxtk12\n```\n\nFeatures: `xaudio2-9` (DirectX Tool Kit for Audio using XAudio 2.9), `gameinput` (Using GameInput for gamepad, keyboard, and mouse), `tools` (command-line tools). Triplets: `x64-windows`, `arm64-windows`, etc.\n\nFor DLL usage (`x64-windows` default triplet), define `DIRECTX_TOOLKIT_IMPORT` in your consuming project. For static library usage, use `-static-md` triplet variants.\n\nCMakeLists.txt:\n\n```cmake\nfind_package(directxtk12 CONFIG REQUIRED)\ntarget_link_libraries(your_target PRIVATE Microsoft::DirectXTK12)\n```\n\nUse the [d3d12game_vcpkg](https:\u002F\u002Fgithub.com\u002Fwalbourn\u002Fdirectx-vs-templates\u002Ftree\u002Fmain\u002Fd3d12game_vcpkg) template as a starting point.\n\n### NuGet\n\nUse `directxtk12_desktop_win10` for Win32 desktop applications or `directxtk12_uwp` for UWP apps.\n\n### Project Reference\n\nAdd the appropriate `.vcxproj` from the `DirectXTK12\u002F` folder to your solution and add a project reference. Add the `DirectXTK12\\Inc` directory to your Additional Include Directories.\n\n## Minimum Requirements\n\n- Windows 10 May 2020 Update SDK (19041) or later\n- Visual Studio 2022, Visual Studio 2026, clang for Windows v12+, or MinGW 12.2\n- Direct3D Feature Level 11.0 or higher\n\n## Getting Started\n\nFor a full step-by-step walkthrough, see the [Getting Started](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Fwiki\u002FGetting-Started) tutorial on the wiki.\n\nA minimal initialization sequence:\n\n1. Create a `ID3D12Device`.\n2. Create a `GraphicsMemory` instance (one per device).\n3. Create a `DescriptorHeap` for SRV\u002FCBV\u002FUAV descriptors.\n4. Use `ResourceUploadBatch` to upload textures and static buffers to the GPU.\n5. Create rendering helpers (e.g., `SpriteBatch`, `Effects`, `Model`) with the appropriate pipeline state.\n6. Each frame, call `GraphicsMemory::Commit` after executing command lists.\n\n## API Reference\n\nThe public API is defined in the header files in the `Inc\u002F` directory. See the [reference overview](reference\u002Foverview.md) for a categorized summary of all classes and helpers.\n\nFull documentation for each class is available on the [GitHub wiki](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Fwiki).\n\nAPI signatures are defined in the public headers under the `Inc\u002F` directory. Always consult those headers for the authoritative function signatures, parameters, and SAL annotations.\n\n## Key Concepts\n\n### Resource Ownership\n\nDirectXTK12 classes follow RAII principles. Most objects are created with `std::make_unique` and destroyed automatically. COM resources are managed with `Microsoft::WRL::ComPtr`.\n\n### Device-Dependent vs Device-Independent\n\nMost DirectXTK12 objects are **device-dependent** — they are created with a `ID3D12Device*` and must be recreated if the device is lost. Plan your resource management accordingly.\n\n### Thread Safety\n\nDirectXTK12 rendering classes (SpriteBatch, Effects, PrimitiveBatch, etc.) are **not** thread-safe. Use one instance per thread, or synchronize access externally. Resource creation (texture loading, model loading) can be done from any thread.\n\n## Key Concepts for DirectX 12 Users\n\n- **Pipeline State Objects (PSOs)**: Unlike the DX11 version, DX12 requires explicit PSO management. Use `EffectPipelineStateDescription` and `RenderTargetState` to configure PSOs for effects and rendering helpers.\n- **Descriptor Heaps**: Use `DescriptorHeap` to manage shader-visible descriptor heaps. Most rendering classes require descriptor heap indices at draw time.\n- **Resource Upload**: GPU resources must be uploaded explicitly. `ResourceUploadBatch` batches uploads into a single command list for efficiency.\n- **Graphics Memory**: `GraphicsMemory` manages per-frame dynamic allocations (constant buffers, dynamic vertex\u002Findex buffers). Call `Commit` once per frame.\n\n## Namespace\n\nAll classes and functions reside in the `DirectX` namespace. Headers that contain Direct3D 12-specific types use `inline namespace DX12` to avoid conflicts when both DX11 and DX12 toolkits are linked together.\n\n```cpp\n#include \"SpriteBatch.h\"\n\n\u002F\u002F Usage:\nauto spriteBatch = std::make_unique\u003CDirectX::SpriteBatch>(device, ...);\n```\n\n## Common Patterns\n\n### Creating an Effect\n\n```cpp\n#include \"Effects.h\"\n#include \"EffectPipelineStateDescription.h\"\n#include \"RenderTargetState.h\"\n\nRenderTargetState rtState(DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_D32_FLOAT);\n\nEffectPipelineStateDescription pd(\n    &VertexPositionNormalTexture::InputLayout,\n    CommonStates::Opaque,\n    CommonStates::DepthDefault,\n    CommonStates::CullCounterClockwise,\n    rtState);\n\nauto effect = std::make_unique\u003CBasicEffect>(device, EffectFlags::Lighting | EffectFlags::Texture, pd);\n```\n\n### Loading and Drawing a Model\n\n```cpp\n#include \"Model.h\"\n\nauto model = Model::CreateFromSDKMESH(device, L\"mymodel.sdkmesh\");\n\n\u002F\u002F Upload resources\nResourceUploadBatch upload(device);\nupload.Begin();\nmodel->LoadStaticBuffers(device, upload);\nupload.End(commandQueue).wait();\n\n\u002F\u002F Draw (simplified — see wiki for full parameter details)\nmodel->Draw(commandList, ...);\n```\n\n### Texture Loading\n\n```cpp\n#include \"DDSTextureLoader.h\"\n#include \"ResourceUploadBatch.h\"\n#include \"DescriptorHeap.h\"\n\nResourceUploadBatch upload(device);\nupload.Begin();\n\nMicrosoft::WRL::ComPtr\u003CID3D12Resource> texture;\nCreateDDSTextureFromFile(device, upload, L\"texture.dds\", texture.ReleaseAndGetAddressOf());\n\nupload.End(commandQueue).wait();\n```\n\n### Input Handling\n\n```cpp\n#include \"Keyboard.h\"\n#include \"Mouse.h\"\n#include \"GamePad.h\"\n\nauto keyboard = std::make_unique\u003CDirectX::Keyboard>();\nauto mouse = std::make_unique\u003CDirectX::Mouse>();\nauto gamePad = std::make_unique\u003CDirectX::GamePad>();\n\n\u002F\u002F In update loop\nauto kb = keyboard->GetState();\nif (kb.Escape)\n    PostQuitMessage(0);\n\nauto pad = gamePad->GetState(0);\nif (pad.IsConnected())\n{\n    if (pad.IsAPressed())\n        \u002F* jump *\u002F;\n}\n```\n\n### Audio\n\n```cpp\n#include \"Audio.h\"\n\n\u002F\u002F Create audio engine\nauto audioEngine = std::make_unique\u003CDirectX::AudioEngine>();\n\n\u002F\u002F Load and play a sound\nauto soundEffect = std::make_unique\u003CDirectX::SoundEffect>(audioEngine.get(), L\"explosion.wav\");\nsoundEffect->Play();\n\n\u002F\u002F Per-frame update\naudioEngine->Update();\n```\n\n> **Note**: Code examples above are simplified for clarity. Consult the [wiki tutorials](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Fwiki\u002FGetting-Started) and public headers in `Inc\u002F` for complete working code with all required parameters.\n\n## Further Reading\n\n- [DirectXTK Wiki](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Fwiki)\n- [DirectX Tool Kit for Audio](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FDirectXTK\u002Fwiki\u002FAudio)\n- [SimpleMath documentation](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FDirectXTK\u002Fwiki\u002FSimpleMath)\n- [Project templates](https:\u002F\u002Fgithub.com\u002Fwalbourn\u002Fdirectx-vs-templates\u002Ftree\u002Fmain\u002Fd3d12game_vcpkg)\n",{"data":43,"body":47},{"name":4,"description":6,"license":26,"metadata":44},{"author":45,"version":46},"chuckw","1.0",{"type":48,"children":49},"root",[50,59,66,80,157,163,170,183,355,360,618,623,885,891,918,960,988,993,1018,1032,1038,1057,1063,1092,1098,1116,1122,1135,1140,1233,1239,1260,1272,1284,1290,1296,1316,1322,1342,1348,1360,1366,1453,1459,1480,1522,1528,1534,1650,1656,1756,1762,1851,1857,2015,2021,2113,2142,2148,2189],{"type":51,"tag":52,"props":53,"children":55},"element","h1",{"id":54},"directx-tool-kit-for-directx-12-usage-guide",[56],{"type":57,"value":58},"text","DirectX Tool Kit for DirectX 12 — Usage Guide",{"type":51,"tag":60,"props":61,"children":63},"h2",{"id":62},"overview",[64],{"type":57,"value":65},"Overview",{"type":51,"tag":67,"props":68,"children":69},"p",{},[70,72,78],{"type":57,"value":71},"The ",{"type":51,"tag":73,"props":74,"children":75},"em",{},[76],{"type":57,"value":77},"DirectX Tool Kit for DirectX 12",{"type":57,"value":79}," (DirectXTK12) is a collection of helper classes for writing Direct3D 12 C++ code for Win32 desktop applications (Windows 10+), Xbox Series X|S, Xbox One, and Universal Windows Platform (UWP) apps.",{"type":51,"tag":81,"props":82,"children":83},"ul",{},[84,103,118,142],{"type":51,"tag":85,"props":86,"children":87},"li",{},[88,94,96],{"type":51,"tag":89,"props":90,"children":91},"strong",{},[92],{"type":57,"value":93},"Repository",{"type":57,"value":95},": ",{"type":51,"tag":97,"props":98,"children":101},"a",{"href":24,"rel":99},[100],"nofollow",[102],{"type":57,"value":24},{"type":51,"tag":85,"props":104,"children":105},{},[106,111,112],{"type":51,"tag":89,"props":107,"children":108},{},[109],{"type":57,"value":110},"Documentation",{"type":57,"value":95},{"type":51,"tag":97,"props":113,"children":116},{"href":114,"rel":115},"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Fwiki",[100],[117],{"type":57,"value":114},{"type":51,"tag":85,"props":119,"children":120},{},[121,126,127,134,136],{"type":51,"tag":89,"props":122,"children":123},{},[124],{"type":57,"value":125},"NuGet Packages",{"type":57,"value":95},{"type":51,"tag":128,"props":129,"children":131},"code",{"className":130},[],[132],{"type":57,"value":133},"directxtk12_desktop_win10",{"type":57,"value":135},", ",{"type":51,"tag":128,"props":137,"children":139},{"className":138},[],[140],{"type":57,"value":141},"directxtk12_uwp",{"type":51,"tag":85,"props":143,"children":144},{},[145,150,151],{"type":51,"tag":89,"props":146,"children":147},{},[148],{"type":57,"value":149},"vcpkg Port",{"type":57,"value":95},{"type":51,"tag":128,"props":152,"children":154},{"className":153},[],[155],{"type":57,"value":156},"directxtk12",{"type":51,"tag":60,"props":158,"children":160},{"id":159},"integration-methods",[161],{"type":57,"value":162},"Integration Methods",{"type":51,"tag":164,"props":165,"children":167},"h3",{"id":166},"vcpkg-manifest-mode-recommended",[168],{"type":57,"value":169},"vcpkg manifest-mode (Recommended)",{"type":51,"tag":67,"props":171,"children":172},{},[173,175,181],{"type":57,"value":174},"In your ",{"type":51,"tag":128,"props":176,"children":178},{"className":177},[],[179],{"type":57,"value":180},"vcpkg.json",{"type":57,"value":182}," file, add the following:",{"type":51,"tag":184,"props":185,"children":190},"pre",{"className":186,"code":187,"language":188,"meta":189,"style":189},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"$schema\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Fvcpkg-tool\u002Fmain\u002Fdocs\u002Fvcpkg.schema.json\",\n  \"dependencies\": [\n    \"directx-headers\",\n    \"directxmath\",\n    \"directxtk12\"\n  ]\n}\n","json","",[191],{"type":51,"tag":128,"props":192,"children":193},{"__ignoreMap":189},[194,206,251,277,299,320,337,346],{"type":51,"tag":195,"props":196,"children":199},"span",{"class":197,"line":198},"line",1,[200],{"type":51,"tag":195,"props":201,"children":203},{"style":202},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[204],{"type":57,"value":205},"{\n",{"type":51,"tag":195,"props":207,"children":209},{"class":197,"line":208},2,[210,215,221,226,231,236,242,246],{"type":51,"tag":195,"props":211,"children":212},{"style":202},[213],{"type":57,"value":214},"  \"",{"type":51,"tag":195,"props":216,"children":218},{"style":217},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[219],{"type":57,"value":220},"$schema",{"type":51,"tag":195,"props":222,"children":223},{"style":202},[224],{"type":57,"value":225},"\"",{"type":51,"tag":195,"props":227,"children":228},{"style":202},[229],{"type":57,"value":230},":",{"type":51,"tag":195,"props":232,"children":233},{"style":202},[234],{"type":57,"value":235}," \"",{"type":51,"tag":195,"props":237,"children":239},{"style":238},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[240],{"type":57,"value":241},"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Fvcpkg-tool\u002Fmain\u002Fdocs\u002Fvcpkg.schema.json",{"type":51,"tag":195,"props":243,"children":244},{"style":202},[245],{"type":57,"value":225},{"type":51,"tag":195,"props":247,"children":248},{"style":202},[249],{"type":57,"value":250},",\n",{"type":51,"tag":195,"props":252,"children":254},{"class":197,"line":253},3,[255,259,264,268,272],{"type":51,"tag":195,"props":256,"children":257},{"style":202},[258],{"type":57,"value":214},{"type":51,"tag":195,"props":260,"children":261},{"style":217},[262],{"type":57,"value":263},"dependencies",{"type":51,"tag":195,"props":265,"children":266},{"style":202},[267],{"type":57,"value":225},{"type":51,"tag":195,"props":269,"children":270},{"style":202},[271],{"type":57,"value":230},{"type":51,"tag":195,"props":273,"children":274},{"style":202},[275],{"type":57,"value":276}," [\n",{"type":51,"tag":195,"props":278,"children":280},{"class":197,"line":279},4,[281,286,291,295],{"type":51,"tag":195,"props":282,"children":283},{"style":202},[284],{"type":57,"value":285},"    \"",{"type":51,"tag":195,"props":287,"children":288},{"style":238},[289],{"type":57,"value":290},"directx-headers",{"type":51,"tag":195,"props":292,"children":293},{"style":202},[294],{"type":57,"value":225},{"type":51,"tag":195,"props":296,"children":297},{"style":202},[298],{"type":57,"value":250},{"type":51,"tag":195,"props":300,"children":302},{"class":197,"line":301},5,[303,307,312,316],{"type":51,"tag":195,"props":304,"children":305},{"style":202},[306],{"type":57,"value":285},{"type":51,"tag":195,"props":308,"children":309},{"style":238},[310],{"type":57,"value":311},"directxmath",{"type":51,"tag":195,"props":313,"children":314},{"style":202},[315],{"type":57,"value":225},{"type":51,"tag":195,"props":317,"children":318},{"style":202},[319],{"type":57,"value":250},{"type":51,"tag":195,"props":321,"children":323},{"class":197,"line":322},6,[324,328,332],{"type":51,"tag":195,"props":325,"children":326},{"style":202},[327],{"type":57,"value":285},{"type":51,"tag":195,"props":329,"children":330},{"style":238},[331],{"type":57,"value":156},{"type":51,"tag":195,"props":333,"children":334},{"style":202},[335],{"type":57,"value":336},"\"\n",{"type":51,"tag":195,"props":338,"children":340},{"class":197,"line":339},7,[341],{"type":51,"tag":195,"props":342,"children":343},{"style":202},[344],{"type":57,"value":345},"  ]\n",{"type":51,"tag":195,"props":347,"children":349},{"class":197,"line":348},8,[350],{"type":51,"tag":195,"props":351,"children":352},{"style":202},[353],{"type":57,"value":354},"}\n",{"type":51,"tag":67,"props":356,"children":357},{},[358],{"type":57,"value":359},"If using GameInput for the game input functionality, add the following:",{"type":51,"tag":184,"props":361,"children":363},{"className":186,"code":362,"language":188,"meta":189,"style":189},"{\n  \"$schema\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Fvcpkg-tool\u002Fmain\u002Fdocs\u002Fvcpkg.schema.json\",\n  \"dependencies\": [\n    \"directx-headers\",\n    \"directxmath\",\n    {\n      \"name\": \"directxtk12\",\n      \"default-features\": false,\n      \"features\": [\n        \"gameinput\"\n      ]\n    }\n  ]\n}\n",[364],{"type":51,"tag":128,"props":365,"children":366},{"__ignoreMap":189},[367,374,409,432,451,470,478,516,541,566,584,593,602,610],{"type":51,"tag":195,"props":368,"children":369},{"class":197,"line":198},[370],{"type":51,"tag":195,"props":371,"children":372},{"style":202},[373],{"type":57,"value":205},{"type":51,"tag":195,"props":375,"children":376},{"class":197,"line":208},[377,381,385,389,393,397,401,405],{"type":51,"tag":195,"props":378,"children":379},{"style":202},[380],{"type":57,"value":214},{"type":51,"tag":195,"props":382,"children":383},{"style":217},[384],{"type":57,"value":220},{"type":51,"tag":195,"props":386,"children":387},{"style":202},[388],{"type":57,"value":225},{"type":51,"tag":195,"props":390,"children":391},{"style":202},[392],{"type":57,"value":230},{"type":51,"tag":195,"props":394,"children":395},{"style":202},[396],{"type":57,"value":235},{"type":51,"tag":195,"props":398,"children":399},{"style":238},[400],{"type":57,"value":241},{"type":51,"tag":195,"props":402,"children":403},{"style":202},[404],{"type":57,"value":225},{"type":51,"tag":195,"props":406,"children":407},{"style":202},[408],{"type":57,"value":250},{"type":51,"tag":195,"props":410,"children":411},{"class":197,"line":253},[412,416,420,424,428],{"type":51,"tag":195,"props":413,"children":414},{"style":202},[415],{"type":57,"value":214},{"type":51,"tag":195,"props":417,"children":418},{"style":217},[419],{"type":57,"value":263},{"type":51,"tag":195,"props":421,"children":422},{"style":202},[423],{"type":57,"value":225},{"type":51,"tag":195,"props":425,"children":426},{"style":202},[427],{"type":57,"value":230},{"type":51,"tag":195,"props":429,"children":430},{"style":202},[431],{"type":57,"value":276},{"type":51,"tag":195,"props":433,"children":434},{"class":197,"line":279},[435,439,443,447],{"type":51,"tag":195,"props":436,"children":437},{"style":202},[438],{"type":57,"value":285},{"type":51,"tag":195,"props":440,"children":441},{"style":238},[442],{"type":57,"value":290},{"type":51,"tag":195,"props":444,"children":445},{"style":202},[446],{"type":57,"value":225},{"type":51,"tag":195,"props":448,"children":449},{"style":202},[450],{"type":57,"value":250},{"type":51,"tag":195,"props":452,"children":453},{"class":197,"line":301},[454,458,462,466],{"type":51,"tag":195,"props":455,"children":456},{"style":202},[457],{"type":57,"value":285},{"type":51,"tag":195,"props":459,"children":460},{"style":238},[461],{"type":57,"value":311},{"type":51,"tag":195,"props":463,"children":464},{"style":202},[465],{"type":57,"value":225},{"type":51,"tag":195,"props":467,"children":468},{"style":202},[469],{"type":57,"value":250},{"type":51,"tag":195,"props":471,"children":472},{"class":197,"line":322},[473],{"type":51,"tag":195,"props":474,"children":475},{"style":202},[476],{"type":57,"value":477},"    {\n",{"type":51,"tag":195,"props":479,"children":480},{"class":197,"line":339},[481,486,492,496,500,504,508,512],{"type":51,"tag":195,"props":482,"children":483},{"style":202},[484],{"type":57,"value":485},"      \"",{"type":51,"tag":195,"props":487,"children":489},{"style":488},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[490],{"type":57,"value":491},"name",{"type":51,"tag":195,"props":493,"children":494},{"style":202},[495],{"type":57,"value":225},{"type":51,"tag":195,"props":497,"children":498},{"style":202},[499],{"type":57,"value":230},{"type":51,"tag":195,"props":501,"children":502},{"style":202},[503],{"type":57,"value":235},{"type":51,"tag":195,"props":505,"children":506},{"style":238},[507],{"type":57,"value":156},{"type":51,"tag":195,"props":509,"children":510},{"style":202},[511],{"type":57,"value":225},{"type":51,"tag":195,"props":513,"children":514},{"style":202},[515],{"type":57,"value":250},{"type":51,"tag":195,"props":517,"children":518},{"class":197,"line":348},[519,523,528,532,536],{"type":51,"tag":195,"props":520,"children":521},{"style":202},[522],{"type":57,"value":485},{"type":51,"tag":195,"props":524,"children":525},{"style":488},[526],{"type":57,"value":527},"default-features",{"type":51,"tag":195,"props":529,"children":530},{"style":202},[531],{"type":57,"value":225},{"type":51,"tag":195,"props":533,"children":534},{"style":202},[535],{"type":57,"value":230},{"type":51,"tag":195,"props":537,"children":538},{"style":202},[539],{"type":57,"value":540}," false,\n",{"type":51,"tag":195,"props":542,"children":544},{"class":197,"line":543},9,[545,549,554,558,562],{"type":51,"tag":195,"props":546,"children":547},{"style":202},[548],{"type":57,"value":485},{"type":51,"tag":195,"props":550,"children":551},{"style":488},[552],{"type":57,"value":553},"features",{"type":51,"tag":195,"props":555,"children":556},{"style":202},[557],{"type":57,"value":225},{"type":51,"tag":195,"props":559,"children":560},{"style":202},[561],{"type":57,"value":230},{"type":51,"tag":195,"props":563,"children":564},{"style":202},[565],{"type":57,"value":276},{"type":51,"tag":195,"props":567,"children":569},{"class":197,"line":568},10,[570,575,580],{"type":51,"tag":195,"props":571,"children":572},{"style":202},[573],{"type":57,"value":574},"        \"",{"type":51,"tag":195,"props":576,"children":577},{"style":238},[578],{"type":57,"value":579},"gameinput",{"type":51,"tag":195,"props":581,"children":582},{"style":202},[583],{"type":57,"value":336},{"type":51,"tag":195,"props":585,"children":587},{"class":197,"line":586},11,[588],{"type":51,"tag":195,"props":589,"children":590},{"style":202},[591],{"type":57,"value":592},"      ]\n",{"type":51,"tag":195,"props":594,"children":596},{"class":197,"line":595},12,[597],{"type":51,"tag":195,"props":598,"children":599},{"style":202},[600],{"type":57,"value":601},"    }\n",{"type":51,"tag":195,"props":603,"children":605},{"class":197,"line":604},13,[606],{"type":51,"tag":195,"props":607,"children":608},{"style":202},[609],{"type":57,"value":345},{"type":51,"tag":195,"props":611,"children":613},{"class":197,"line":612},14,[614],{"type":51,"tag":195,"props":615,"children":616},{"style":202},[617],{"type":57,"value":354},{"type":51,"tag":67,"props":619,"children":620},{},[621],{"type":57,"value":622},"If using DirectX Tool Kit for Audio and GameInput, add the following:",{"type":51,"tag":184,"props":624,"children":626},{"className":186,"code":625,"language":188,"meta":189,"style":189},"{\n  \"$schema\": \"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Fvcpkg-tool\u002Fmain\u002Fdocs\u002Fvcpkg.schema.json\",\n  \"dependencies\": [\n    \"directx-headers\",\n    \"directxmath\",\n    {\n      \"name\": \"directxtk12\",\n      \"default-features\": false,\n      \"features\": [\n        \"gameinput\",\n        \"xaudio2-9\"\n      ]\n    }\n  ]\n}\n",[627],{"type":51,"tag":128,"props":628,"children":629},{"__ignoreMap":189},[630,637,672,695,714,733,740,775,798,821,840,856,863,870,877],{"type":51,"tag":195,"props":631,"children":632},{"class":197,"line":198},[633],{"type":51,"tag":195,"props":634,"children":635},{"style":202},[636],{"type":57,"value":205},{"type":51,"tag":195,"props":638,"children":639},{"class":197,"line":208},[640,644,648,652,656,660,664,668],{"type":51,"tag":195,"props":641,"children":642},{"style":202},[643],{"type":57,"value":214},{"type":51,"tag":195,"props":645,"children":646},{"style":217},[647],{"type":57,"value":220},{"type":51,"tag":195,"props":649,"children":650},{"style":202},[651],{"type":57,"value":225},{"type":51,"tag":195,"props":653,"children":654},{"style":202},[655],{"type":57,"value":230},{"type":51,"tag":195,"props":657,"children":658},{"style":202},[659],{"type":57,"value":235},{"type":51,"tag":195,"props":661,"children":662},{"style":238},[663],{"type":57,"value":241},{"type":51,"tag":195,"props":665,"children":666},{"style":202},[667],{"type":57,"value":225},{"type":51,"tag":195,"props":669,"children":670},{"style":202},[671],{"type":57,"value":250},{"type":51,"tag":195,"props":673,"children":674},{"class":197,"line":253},[675,679,683,687,691],{"type":51,"tag":195,"props":676,"children":677},{"style":202},[678],{"type":57,"value":214},{"type":51,"tag":195,"props":680,"children":681},{"style":217},[682],{"type":57,"value":263},{"type":51,"tag":195,"props":684,"children":685},{"style":202},[686],{"type":57,"value":225},{"type":51,"tag":195,"props":688,"children":689},{"style":202},[690],{"type":57,"value":230},{"type":51,"tag":195,"props":692,"children":693},{"style":202},[694],{"type":57,"value":276},{"type":51,"tag":195,"props":696,"children":697},{"class":197,"line":279},[698,702,706,710],{"type":51,"tag":195,"props":699,"children":700},{"style":202},[701],{"type":57,"value":285},{"type":51,"tag":195,"props":703,"children":704},{"style":238},[705],{"type":57,"value":290},{"type":51,"tag":195,"props":707,"children":708},{"style":202},[709],{"type":57,"value":225},{"type":51,"tag":195,"props":711,"children":712},{"style":202},[713],{"type":57,"value":250},{"type":51,"tag":195,"props":715,"children":716},{"class":197,"line":301},[717,721,725,729],{"type":51,"tag":195,"props":718,"children":719},{"style":202},[720],{"type":57,"value":285},{"type":51,"tag":195,"props":722,"children":723},{"style":238},[724],{"type":57,"value":311},{"type":51,"tag":195,"props":726,"children":727},{"style":202},[728],{"type":57,"value":225},{"type":51,"tag":195,"props":730,"children":731},{"style":202},[732],{"type":57,"value":250},{"type":51,"tag":195,"props":734,"children":735},{"class":197,"line":322},[736],{"type":51,"tag":195,"props":737,"children":738},{"style":202},[739],{"type":57,"value":477},{"type":51,"tag":195,"props":741,"children":742},{"class":197,"line":339},[743,747,751,755,759,763,767,771],{"type":51,"tag":195,"props":744,"children":745},{"style":202},[746],{"type":57,"value":485},{"type":51,"tag":195,"props":748,"children":749},{"style":488},[750],{"type":57,"value":491},{"type":51,"tag":195,"props":752,"children":753},{"style":202},[754],{"type":57,"value":225},{"type":51,"tag":195,"props":756,"children":757},{"style":202},[758],{"type":57,"value":230},{"type":51,"tag":195,"props":760,"children":761},{"style":202},[762],{"type":57,"value":235},{"type":51,"tag":195,"props":764,"children":765},{"style":238},[766],{"type":57,"value":156},{"type":51,"tag":195,"props":768,"children":769},{"style":202},[770],{"type":57,"value":225},{"type":51,"tag":195,"props":772,"children":773},{"style":202},[774],{"type":57,"value":250},{"type":51,"tag":195,"props":776,"children":777},{"class":197,"line":348},[778,782,786,790,794],{"type":51,"tag":195,"props":779,"children":780},{"style":202},[781],{"type":57,"value":485},{"type":51,"tag":195,"props":783,"children":784},{"style":488},[785],{"type":57,"value":527},{"type":51,"tag":195,"props":787,"children":788},{"style":202},[789],{"type":57,"value":225},{"type":51,"tag":195,"props":791,"children":792},{"style":202},[793],{"type":57,"value":230},{"type":51,"tag":195,"props":795,"children":796},{"style":202},[797],{"type":57,"value":540},{"type":51,"tag":195,"props":799,"children":800},{"class":197,"line":543},[801,805,809,813,817],{"type":51,"tag":195,"props":802,"children":803},{"style":202},[804],{"type":57,"value":485},{"type":51,"tag":195,"props":806,"children":807},{"style":488},[808],{"type":57,"value":553},{"type":51,"tag":195,"props":810,"children":811},{"style":202},[812],{"type":57,"value":225},{"type":51,"tag":195,"props":814,"children":815},{"style":202},[816],{"type":57,"value":230},{"type":51,"tag":195,"props":818,"children":819},{"style":202},[820],{"type":57,"value":276},{"type":51,"tag":195,"props":822,"children":823},{"class":197,"line":568},[824,828,832,836],{"type":51,"tag":195,"props":825,"children":826},{"style":202},[827],{"type":57,"value":574},{"type":51,"tag":195,"props":829,"children":830},{"style":238},[831],{"type":57,"value":579},{"type":51,"tag":195,"props":833,"children":834},{"style":202},[835],{"type":57,"value":225},{"type":51,"tag":195,"props":837,"children":838},{"style":202},[839],{"type":57,"value":250},{"type":51,"tag":195,"props":841,"children":842},{"class":197,"line":586},[843,847,852],{"type":51,"tag":195,"props":844,"children":845},{"style":202},[846],{"type":57,"value":574},{"type":51,"tag":195,"props":848,"children":849},{"style":238},[850],{"type":57,"value":851},"xaudio2-9",{"type":51,"tag":195,"props":853,"children":854},{"style":202},[855],{"type":57,"value":336},{"type":51,"tag":195,"props":857,"children":858},{"class":197,"line":595},[859],{"type":51,"tag":195,"props":860,"children":861},{"style":202},[862],{"type":57,"value":592},{"type":51,"tag":195,"props":864,"children":865},{"class":197,"line":604},[866],{"type":51,"tag":195,"props":867,"children":868},{"style":202},[869],{"type":57,"value":601},{"type":51,"tag":195,"props":871,"children":872},{"class":197,"line":612},[873],{"type":51,"tag":195,"props":874,"children":875},{"style":202},[876],{"type":57,"value":345},{"type":51,"tag":195,"props":878,"children":880},{"class":197,"line":879},15,[881],{"type":51,"tag":195,"props":882,"children":883},{"style":202},[884],{"type":57,"value":354},{"type":51,"tag":164,"props":886,"children":888},{"id":887},"vcpkg-classic",[889],{"type":57,"value":890},"vcpkg (classic)",{"type":51,"tag":184,"props":892,"children":896},{"className":893,"code":894,"language":895,"meta":189,"style":189},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","vcpkg install directxtk12\n","bash",[897],{"type":51,"tag":128,"props":898,"children":899},{"__ignoreMap":189},[900],{"type":51,"tag":195,"props":901,"children":902},{"class":197,"line":198},[903,908,913],{"type":51,"tag":195,"props":904,"children":905},{"style":488},[906],{"type":57,"value":907},"vcpkg",{"type":51,"tag":195,"props":909,"children":910},{"style":238},[911],{"type":57,"value":912}," install",{"type":51,"tag":195,"props":914,"children":915},{"style":238},[916],{"type":57,"value":917}," directxtk12\n",{"type":51,"tag":67,"props":919,"children":920},{},[921,923,928,930,935,937,943,945,951,952,958],{"type":57,"value":922},"Features: ",{"type":51,"tag":128,"props":924,"children":926},{"className":925},[],[927],{"type":57,"value":851},{"type":57,"value":929}," (DirectX Tool Kit for Audio using XAudio 2.9), ",{"type":51,"tag":128,"props":931,"children":933},{"className":932},[],[934],{"type":57,"value":579},{"type":57,"value":936}," (Using GameInput for gamepad, keyboard, and mouse), ",{"type":51,"tag":128,"props":938,"children":940},{"className":939},[],[941],{"type":57,"value":942},"tools",{"type":57,"value":944}," (command-line tools). Triplets: ",{"type":51,"tag":128,"props":946,"children":948},{"className":947},[],[949],{"type":57,"value":950},"x64-windows",{"type":57,"value":135},{"type":51,"tag":128,"props":953,"children":955},{"className":954},[],[956],{"type":57,"value":957},"arm64-windows",{"type":57,"value":959},", etc.",{"type":51,"tag":67,"props":961,"children":962},{},[963,965,970,972,978,980,986],{"type":57,"value":964},"For DLL usage (",{"type":51,"tag":128,"props":966,"children":968},{"className":967},[],[969],{"type":57,"value":950},{"type":57,"value":971}," default triplet), define ",{"type":51,"tag":128,"props":973,"children":975},{"className":974},[],[976],{"type":57,"value":977},"DIRECTX_TOOLKIT_IMPORT",{"type":57,"value":979}," in your consuming project. For static library usage, use ",{"type":51,"tag":128,"props":981,"children":983},{"className":982},[],[984],{"type":57,"value":985},"-static-md",{"type":57,"value":987}," triplet variants.",{"type":51,"tag":67,"props":989,"children":990},{},[991],{"type":57,"value":992},"CMakeLists.txt:",{"type":51,"tag":184,"props":994,"children":998},{"className":995,"code":996,"language":997,"meta":189,"style":189},"language-cmake shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","find_package(directxtk12 CONFIG REQUIRED)\ntarget_link_libraries(your_target PRIVATE Microsoft::DirectXTK12)\n","cmake",[999],{"type":51,"tag":128,"props":1000,"children":1001},{"__ignoreMap":189},[1002,1010],{"type":51,"tag":195,"props":1003,"children":1004},{"class":197,"line":198},[1005],{"type":51,"tag":195,"props":1006,"children":1007},{},[1008],{"type":57,"value":1009},"find_package(directxtk12 CONFIG REQUIRED)\n",{"type":51,"tag":195,"props":1011,"children":1012},{"class":197,"line":208},[1013],{"type":51,"tag":195,"props":1014,"children":1015},{},[1016],{"type":57,"value":1017},"target_link_libraries(your_target PRIVATE Microsoft::DirectXTK12)\n",{"type":51,"tag":67,"props":1019,"children":1020},{},[1021,1023,1030],{"type":57,"value":1022},"Use the ",{"type":51,"tag":97,"props":1024,"children":1027},{"href":1025,"rel":1026},"https:\u002F\u002Fgithub.com\u002Fwalbourn\u002Fdirectx-vs-templates\u002Ftree\u002Fmain\u002Fd3d12game_vcpkg",[100],[1028],{"type":57,"value":1029},"d3d12game_vcpkg",{"type":57,"value":1031}," template as a starting point.",{"type":51,"tag":164,"props":1033,"children":1035},{"id":1034},"nuget",[1036],{"type":57,"value":1037},"NuGet",{"type":51,"tag":67,"props":1039,"children":1040},{},[1041,1043,1048,1050,1055],{"type":57,"value":1042},"Use ",{"type":51,"tag":128,"props":1044,"children":1046},{"className":1045},[],[1047],{"type":57,"value":133},{"type":57,"value":1049}," for Win32 desktop applications or ",{"type":51,"tag":128,"props":1051,"children":1053},{"className":1052},[],[1054],{"type":57,"value":141},{"type":57,"value":1056}," for UWP apps.",{"type":51,"tag":164,"props":1058,"children":1060},{"id":1059},"project-reference",[1061],{"type":57,"value":1062},"Project Reference",{"type":51,"tag":67,"props":1064,"children":1065},{},[1066,1068,1074,1076,1082,1084,1090],{"type":57,"value":1067},"Add the appropriate ",{"type":51,"tag":128,"props":1069,"children":1071},{"className":1070},[],[1072],{"type":57,"value":1073},".vcxproj",{"type":57,"value":1075}," from the ",{"type":51,"tag":128,"props":1077,"children":1079},{"className":1078},[],[1080],{"type":57,"value":1081},"DirectXTK12\u002F",{"type":57,"value":1083}," folder to your solution and add a project reference. Add the ",{"type":51,"tag":128,"props":1085,"children":1087},{"className":1086},[],[1088],{"type":57,"value":1089},"DirectXTK12\\Inc",{"type":57,"value":1091}," directory to your Additional Include Directories.",{"type":51,"tag":60,"props":1093,"children":1095},{"id":1094},"minimum-requirements",[1096],{"type":57,"value":1097},"Minimum Requirements",{"type":51,"tag":81,"props":1099,"children":1100},{},[1101,1106,1111],{"type":51,"tag":85,"props":1102,"children":1103},{},[1104],{"type":57,"value":1105},"Windows 10 May 2020 Update SDK (19041) or later",{"type":51,"tag":85,"props":1107,"children":1108},{},[1109],{"type":57,"value":1110},"Visual Studio 2022, Visual Studio 2026, clang for Windows v12+, or MinGW 12.2",{"type":51,"tag":85,"props":1112,"children":1113},{},[1114],{"type":57,"value":1115},"Direct3D Feature Level 11.0 or higher",{"type":51,"tag":60,"props":1117,"children":1119},{"id":1118},"getting-started",[1120],{"type":57,"value":1121},"Getting Started",{"type":51,"tag":67,"props":1123,"children":1124},{},[1125,1127,1133],{"type":57,"value":1126},"For a full step-by-step walkthrough, see the ",{"type":51,"tag":97,"props":1128,"children":1131},{"href":1129,"rel":1130},"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FDirectXTK12\u002Fwiki\u002FGetting-Started",[100],[1132],{"type":57,"value":1121},{"type":57,"value":1134}," tutorial on the wiki.",{"type":51,"tag":67,"props":1136,"children":1137},{},[1138],{"type":57,"value":1139},"A minimal initialization sequence:",{"type":51,"tag":1141,"props":1142,"children":1143},"ol",{},[1144,1157,1169,1181,1193,1220],{"type":51,"tag":85,"props":1145,"children":1146},{},[1147,1149,1155],{"type":57,"value":1148},"Create a ",{"type":51,"tag":128,"props":1150,"children":1152},{"className":1151},[],[1153],{"type":57,"value":1154},"ID3D12Device",{"type":57,"value":1156},".",{"type":51,"tag":85,"props":1158,"children":1159},{},[1160,1161,1167],{"type":57,"value":1148},{"type":51,"tag":128,"props":1162,"children":1164},{"className":1163},[],[1165],{"type":57,"value":1166},"GraphicsMemory",{"type":57,"value":1168}," instance (one per device).",{"type":51,"tag":85,"props":1170,"children":1171},{},[1172,1173,1179],{"type":57,"value":1148},{"type":51,"tag":128,"props":1174,"children":1176},{"className":1175},[],[1177],{"type":57,"value":1178},"DescriptorHeap",{"type":57,"value":1180}," for SRV\u002FCBV\u002FUAV descriptors.",{"type":51,"tag":85,"props":1182,"children":1183},{},[1184,1185,1191],{"type":57,"value":1042},{"type":51,"tag":128,"props":1186,"children":1188},{"className":1187},[],[1189],{"type":57,"value":1190},"ResourceUploadBatch",{"type":57,"value":1192}," to upload textures and static buffers to the GPU.",{"type":51,"tag":85,"props":1194,"children":1195},{},[1196,1198,1204,1205,1211,1212,1218],{"type":57,"value":1197},"Create rendering helpers (e.g., ",{"type":51,"tag":128,"props":1199,"children":1201},{"className":1200},[],[1202],{"type":57,"value":1203},"SpriteBatch",{"type":57,"value":135},{"type":51,"tag":128,"props":1206,"children":1208},{"className":1207},[],[1209],{"type":57,"value":1210},"Effects",{"type":57,"value":135},{"type":51,"tag":128,"props":1213,"children":1215},{"className":1214},[],[1216],{"type":57,"value":1217},"Model",{"type":57,"value":1219},") with the appropriate pipeline state.",{"type":51,"tag":85,"props":1221,"children":1222},{},[1223,1225,1231],{"type":57,"value":1224},"Each frame, call ",{"type":51,"tag":128,"props":1226,"children":1228},{"className":1227},[],[1229],{"type":57,"value":1230},"GraphicsMemory::Commit",{"type":57,"value":1232}," after executing command lists.",{"type":51,"tag":60,"props":1234,"children":1236},{"id":1235},"api-reference",[1237],{"type":57,"value":1238},"API Reference",{"type":51,"tag":67,"props":1240,"children":1241},{},[1242,1244,1250,1252,1258],{"type":57,"value":1243},"The public API is defined in the header files in the ",{"type":51,"tag":128,"props":1245,"children":1247},{"className":1246},[],[1248],{"type":57,"value":1249},"Inc\u002F",{"type":57,"value":1251}," directory. See the ",{"type":51,"tag":97,"props":1253,"children":1255},{"href":1254},"reference\u002Foverview.md",[1256],{"type":57,"value":1257},"reference overview",{"type":57,"value":1259}," for a categorized summary of all classes and helpers.",{"type":51,"tag":67,"props":1261,"children":1262},{},[1263,1265,1271],{"type":57,"value":1264},"Full documentation for each class is available on the ",{"type":51,"tag":97,"props":1266,"children":1268},{"href":114,"rel":1267},[100],[1269],{"type":57,"value":1270},"GitHub wiki",{"type":57,"value":1156},{"type":51,"tag":67,"props":1273,"children":1274},{},[1275,1277,1282],{"type":57,"value":1276},"API signatures are defined in the public headers under the ",{"type":51,"tag":128,"props":1278,"children":1280},{"className":1279},[],[1281],{"type":57,"value":1249},{"type":57,"value":1283}," directory. Always consult those headers for the authoritative function signatures, parameters, and SAL annotations.",{"type":51,"tag":60,"props":1285,"children":1287},{"id":1286},"key-concepts",[1288],{"type":57,"value":1289},"Key Concepts",{"type":51,"tag":164,"props":1291,"children":1293},{"id":1292},"resource-ownership",[1294],{"type":57,"value":1295},"Resource Ownership",{"type":51,"tag":67,"props":1297,"children":1298},{},[1299,1301,1307,1309,1315],{"type":57,"value":1300},"DirectXTK12 classes follow RAII principles. Most objects are created with ",{"type":51,"tag":128,"props":1302,"children":1304},{"className":1303},[],[1305],{"type":57,"value":1306},"std::make_unique",{"type":57,"value":1308}," and destroyed automatically. COM resources are managed with ",{"type":51,"tag":128,"props":1310,"children":1312},{"className":1311},[],[1313],{"type":57,"value":1314},"Microsoft::WRL::ComPtr",{"type":57,"value":1156},{"type":51,"tag":164,"props":1317,"children":1319},{"id":1318},"device-dependent-vs-device-independent",[1320],{"type":57,"value":1321},"Device-Dependent vs Device-Independent",{"type":51,"tag":67,"props":1323,"children":1324},{},[1325,1327,1332,1334,1340],{"type":57,"value":1326},"Most DirectXTK12 objects are ",{"type":51,"tag":89,"props":1328,"children":1329},{},[1330],{"type":57,"value":1331},"device-dependent",{"type":57,"value":1333}," — they are created with a ",{"type":51,"tag":128,"props":1335,"children":1337},{"className":1336},[],[1338],{"type":57,"value":1339},"ID3D12Device*",{"type":57,"value":1341}," and must be recreated if the device is lost. Plan your resource management accordingly.",{"type":51,"tag":164,"props":1343,"children":1345},{"id":1344},"thread-safety",[1346],{"type":57,"value":1347},"Thread Safety",{"type":51,"tag":67,"props":1349,"children":1350},{},[1351,1353,1358],{"type":57,"value":1352},"DirectXTK12 rendering classes (SpriteBatch, Effects, PrimitiveBatch, etc.) are ",{"type":51,"tag":89,"props":1354,"children":1355},{},[1356],{"type":57,"value":1357},"not",{"type":57,"value":1359}," thread-safe. Use one instance per thread, or synchronize access externally. Resource creation (texture loading, model loading) can be done from any thread.",{"type":51,"tag":60,"props":1361,"children":1363},{"id":1362},"key-concepts-for-directx-12-users",[1364],{"type":57,"value":1365},"Key Concepts for DirectX 12 Users",{"type":51,"tag":81,"props":1367,"children":1368},{},[1369,1395,1412,1429],{"type":51,"tag":85,"props":1370,"children":1371},{},[1372,1377,1379,1385,1387,1393],{"type":51,"tag":89,"props":1373,"children":1374},{},[1375],{"type":57,"value":1376},"Pipeline State Objects (PSOs)",{"type":57,"value":1378},": Unlike the DX11 version, DX12 requires explicit PSO management. Use ",{"type":51,"tag":128,"props":1380,"children":1382},{"className":1381},[],[1383],{"type":57,"value":1384},"EffectPipelineStateDescription",{"type":57,"value":1386}," and ",{"type":51,"tag":128,"props":1388,"children":1390},{"className":1389},[],[1391],{"type":57,"value":1392},"RenderTargetState",{"type":57,"value":1394}," to configure PSOs for effects and rendering helpers.",{"type":51,"tag":85,"props":1396,"children":1397},{},[1398,1403,1405,1410],{"type":51,"tag":89,"props":1399,"children":1400},{},[1401],{"type":57,"value":1402},"Descriptor Heaps",{"type":57,"value":1404},": Use ",{"type":51,"tag":128,"props":1406,"children":1408},{"className":1407},[],[1409],{"type":57,"value":1178},{"type":57,"value":1411}," to manage shader-visible descriptor heaps. Most rendering classes require descriptor heap indices at draw time.",{"type":51,"tag":85,"props":1413,"children":1414},{},[1415,1420,1422,1427],{"type":51,"tag":89,"props":1416,"children":1417},{},[1418],{"type":57,"value":1419},"Resource Upload",{"type":57,"value":1421},": GPU resources must be uploaded explicitly. ",{"type":51,"tag":128,"props":1423,"children":1425},{"className":1424},[],[1426],{"type":57,"value":1190},{"type":57,"value":1428}," batches uploads into a single command list for efficiency.",{"type":51,"tag":85,"props":1430,"children":1431},{},[1432,1437,1438,1443,1445,1451],{"type":51,"tag":89,"props":1433,"children":1434},{},[1435],{"type":57,"value":1436},"Graphics Memory",{"type":57,"value":95},{"type":51,"tag":128,"props":1439,"children":1441},{"className":1440},[],[1442],{"type":57,"value":1166},{"type":57,"value":1444}," manages per-frame dynamic allocations (constant buffers, dynamic vertex\u002Findex buffers). Call ",{"type":51,"tag":128,"props":1446,"children":1448},{"className":1447},[],[1449],{"type":57,"value":1450},"Commit",{"type":57,"value":1452}," once per frame.",{"type":51,"tag":60,"props":1454,"children":1456},{"id":1455},"namespace",[1457],{"type":57,"value":1458},"Namespace",{"type":51,"tag":67,"props":1460,"children":1461},{},[1462,1464,1470,1472,1478],{"type":57,"value":1463},"All classes and functions reside in the ",{"type":51,"tag":128,"props":1465,"children":1467},{"className":1466},[],[1468],{"type":57,"value":1469},"DirectX",{"type":57,"value":1471}," namespace. Headers that contain Direct3D 12-specific types use ",{"type":51,"tag":128,"props":1473,"children":1475},{"className":1474},[],[1476],{"type":57,"value":1477},"inline namespace DX12",{"type":57,"value":1479}," to avoid conflicts when both DX11 and DX12 toolkits are linked together.",{"type":51,"tag":184,"props":1481,"children":1485},{"className":1482,"code":1483,"language":1484,"meta":189,"style":189},"language-cpp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","#include \"SpriteBatch.h\"\n\n\u002F\u002F Usage:\nauto spriteBatch = std::make_unique\u003CDirectX::SpriteBatch>(device, ...);\n","cpp",[1486],{"type":51,"tag":128,"props":1487,"children":1488},{"__ignoreMap":189},[1489,1497,1506,1514],{"type":51,"tag":195,"props":1490,"children":1491},{"class":197,"line":198},[1492],{"type":51,"tag":195,"props":1493,"children":1494},{},[1495],{"type":57,"value":1496},"#include \"SpriteBatch.h\"\n",{"type":51,"tag":195,"props":1498,"children":1499},{"class":197,"line":208},[1500],{"type":51,"tag":195,"props":1501,"children":1503},{"emptyLinePlaceholder":1502},true,[1504],{"type":57,"value":1505},"\n",{"type":51,"tag":195,"props":1507,"children":1508},{"class":197,"line":253},[1509],{"type":51,"tag":195,"props":1510,"children":1511},{},[1512],{"type":57,"value":1513},"\u002F\u002F Usage:\n",{"type":51,"tag":195,"props":1515,"children":1516},{"class":197,"line":279},[1517],{"type":51,"tag":195,"props":1518,"children":1519},{},[1520],{"type":57,"value":1521},"auto spriteBatch = std::make_unique\u003CDirectX::SpriteBatch>(device, ...);\n",{"type":51,"tag":60,"props":1523,"children":1525},{"id":1524},"common-patterns",[1526],{"type":57,"value":1527},"Common Patterns",{"type":51,"tag":164,"props":1529,"children":1531},{"id":1530},"creating-an-effect",[1532],{"type":57,"value":1533},"Creating an Effect",{"type":51,"tag":184,"props":1535,"children":1537},{"className":1482,"code":1536,"language":1484,"meta":189,"style":189},"#include \"Effects.h\"\n#include \"EffectPipelineStateDescription.h\"\n#include \"RenderTargetState.h\"\n\nRenderTargetState rtState(DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_D32_FLOAT);\n\nEffectPipelineStateDescription pd(\n    &VertexPositionNormalTexture::InputLayout,\n    CommonStates::Opaque,\n    CommonStates::DepthDefault,\n    CommonStates::CullCounterClockwise,\n    rtState);\n\nauto effect = std::make_unique\u003CBasicEffect>(device, EffectFlags::Lighting | EffectFlags::Texture, pd);\n",[1538],{"type":51,"tag":128,"props":1539,"children":1540},{"__ignoreMap":189},[1541,1549,1557,1565,1572,1580,1587,1595,1603,1611,1619,1627,1635,1642],{"type":51,"tag":195,"props":1542,"children":1543},{"class":197,"line":198},[1544],{"type":51,"tag":195,"props":1545,"children":1546},{},[1547],{"type":57,"value":1548},"#include \"Effects.h\"\n",{"type":51,"tag":195,"props":1550,"children":1551},{"class":197,"line":208},[1552],{"type":51,"tag":195,"props":1553,"children":1554},{},[1555],{"type":57,"value":1556},"#include \"EffectPipelineStateDescription.h\"\n",{"type":51,"tag":195,"props":1558,"children":1559},{"class":197,"line":253},[1560],{"type":51,"tag":195,"props":1561,"children":1562},{},[1563],{"type":57,"value":1564},"#include \"RenderTargetState.h\"\n",{"type":51,"tag":195,"props":1566,"children":1567},{"class":197,"line":279},[1568],{"type":51,"tag":195,"props":1569,"children":1570},{"emptyLinePlaceholder":1502},[1571],{"type":57,"value":1505},{"type":51,"tag":195,"props":1573,"children":1574},{"class":197,"line":301},[1575],{"type":51,"tag":195,"props":1576,"children":1577},{},[1578],{"type":57,"value":1579},"RenderTargetState rtState(DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_D32_FLOAT);\n",{"type":51,"tag":195,"props":1581,"children":1582},{"class":197,"line":322},[1583],{"type":51,"tag":195,"props":1584,"children":1585},{"emptyLinePlaceholder":1502},[1586],{"type":57,"value":1505},{"type":51,"tag":195,"props":1588,"children":1589},{"class":197,"line":339},[1590],{"type":51,"tag":195,"props":1591,"children":1592},{},[1593],{"type":57,"value":1594},"EffectPipelineStateDescription pd(\n",{"type":51,"tag":195,"props":1596,"children":1597},{"class":197,"line":348},[1598],{"type":51,"tag":195,"props":1599,"children":1600},{},[1601],{"type":57,"value":1602},"    &VertexPositionNormalTexture::InputLayout,\n",{"type":51,"tag":195,"props":1604,"children":1605},{"class":197,"line":543},[1606],{"type":51,"tag":195,"props":1607,"children":1608},{},[1609],{"type":57,"value":1610},"    CommonStates::Opaque,\n",{"type":51,"tag":195,"props":1612,"children":1613},{"class":197,"line":568},[1614],{"type":51,"tag":195,"props":1615,"children":1616},{},[1617],{"type":57,"value":1618},"    CommonStates::DepthDefault,\n",{"type":51,"tag":195,"props":1620,"children":1621},{"class":197,"line":586},[1622],{"type":51,"tag":195,"props":1623,"children":1624},{},[1625],{"type":57,"value":1626},"    CommonStates::CullCounterClockwise,\n",{"type":51,"tag":195,"props":1628,"children":1629},{"class":197,"line":595},[1630],{"type":51,"tag":195,"props":1631,"children":1632},{},[1633],{"type":57,"value":1634},"    rtState);\n",{"type":51,"tag":195,"props":1636,"children":1637},{"class":197,"line":604},[1638],{"type":51,"tag":195,"props":1639,"children":1640},{"emptyLinePlaceholder":1502},[1641],{"type":57,"value":1505},{"type":51,"tag":195,"props":1643,"children":1644},{"class":197,"line":612},[1645],{"type":51,"tag":195,"props":1646,"children":1647},{},[1648],{"type":57,"value":1649},"auto effect = std::make_unique\u003CBasicEffect>(device, EffectFlags::Lighting | EffectFlags::Texture, pd);\n",{"type":51,"tag":164,"props":1651,"children":1653},{"id":1652},"loading-and-drawing-a-model",[1654],{"type":57,"value":1655},"Loading and Drawing a Model",{"type":51,"tag":184,"props":1657,"children":1659},{"className":1482,"code":1658,"language":1484,"meta":189,"style":189},"#include \"Model.h\"\n\nauto model = Model::CreateFromSDKMESH(device, L\"mymodel.sdkmesh\");\n\n\u002F\u002F Upload resources\nResourceUploadBatch upload(device);\nupload.Begin();\nmodel->LoadStaticBuffers(device, upload);\nupload.End(commandQueue).wait();\n\n\u002F\u002F Draw (simplified — see wiki for full parameter details)\nmodel->Draw(commandList, ...);\n",[1660],{"type":51,"tag":128,"props":1661,"children":1662},{"__ignoreMap":189},[1663,1671,1678,1686,1693,1701,1709,1717,1725,1733,1740,1748],{"type":51,"tag":195,"props":1664,"children":1665},{"class":197,"line":198},[1666],{"type":51,"tag":195,"props":1667,"children":1668},{},[1669],{"type":57,"value":1670},"#include \"Model.h\"\n",{"type":51,"tag":195,"props":1672,"children":1673},{"class":197,"line":208},[1674],{"type":51,"tag":195,"props":1675,"children":1676},{"emptyLinePlaceholder":1502},[1677],{"type":57,"value":1505},{"type":51,"tag":195,"props":1679,"children":1680},{"class":197,"line":253},[1681],{"type":51,"tag":195,"props":1682,"children":1683},{},[1684],{"type":57,"value":1685},"auto model = Model::CreateFromSDKMESH(device, L\"mymodel.sdkmesh\");\n",{"type":51,"tag":195,"props":1687,"children":1688},{"class":197,"line":279},[1689],{"type":51,"tag":195,"props":1690,"children":1691},{"emptyLinePlaceholder":1502},[1692],{"type":57,"value":1505},{"type":51,"tag":195,"props":1694,"children":1695},{"class":197,"line":301},[1696],{"type":51,"tag":195,"props":1697,"children":1698},{},[1699],{"type":57,"value":1700},"\u002F\u002F Upload resources\n",{"type":51,"tag":195,"props":1702,"children":1703},{"class":197,"line":322},[1704],{"type":51,"tag":195,"props":1705,"children":1706},{},[1707],{"type":57,"value":1708},"ResourceUploadBatch upload(device);\n",{"type":51,"tag":195,"props":1710,"children":1711},{"class":197,"line":339},[1712],{"type":51,"tag":195,"props":1713,"children":1714},{},[1715],{"type":57,"value":1716},"upload.Begin();\n",{"type":51,"tag":195,"props":1718,"children":1719},{"class":197,"line":348},[1720],{"type":51,"tag":195,"props":1721,"children":1722},{},[1723],{"type":57,"value":1724},"model->LoadStaticBuffers(device, upload);\n",{"type":51,"tag":195,"props":1726,"children":1727},{"class":197,"line":543},[1728],{"type":51,"tag":195,"props":1729,"children":1730},{},[1731],{"type":57,"value":1732},"upload.End(commandQueue).wait();\n",{"type":51,"tag":195,"props":1734,"children":1735},{"class":197,"line":568},[1736],{"type":51,"tag":195,"props":1737,"children":1738},{"emptyLinePlaceholder":1502},[1739],{"type":57,"value":1505},{"type":51,"tag":195,"props":1741,"children":1742},{"class":197,"line":586},[1743],{"type":51,"tag":195,"props":1744,"children":1745},{},[1746],{"type":57,"value":1747},"\u002F\u002F Draw (simplified — see wiki for full parameter details)\n",{"type":51,"tag":195,"props":1749,"children":1750},{"class":197,"line":595},[1751],{"type":51,"tag":195,"props":1752,"children":1753},{},[1754],{"type":57,"value":1755},"model->Draw(commandList, ...);\n",{"type":51,"tag":164,"props":1757,"children":1759},{"id":1758},"texture-loading",[1760],{"type":57,"value":1761},"Texture Loading",{"type":51,"tag":184,"props":1763,"children":1765},{"className":1482,"code":1764,"language":1484,"meta":189,"style":189},"#include \"DDSTextureLoader.h\"\n#include \"ResourceUploadBatch.h\"\n#include \"DescriptorHeap.h\"\n\nResourceUploadBatch upload(device);\nupload.Begin();\n\nMicrosoft::WRL::ComPtr\u003CID3D12Resource> texture;\nCreateDDSTextureFromFile(device, upload, L\"texture.dds\", texture.ReleaseAndGetAddressOf());\n\nupload.End(commandQueue).wait();\n",[1766],{"type":51,"tag":128,"props":1767,"children":1768},{"__ignoreMap":189},[1769,1777,1785,1793,1800,1807,1814,1821,1829,1837,1844],{"type":51,"tag":195,"props":1770,"children":1771},{"class":197,"line":198},[1772],{"type":51,"tag":195,"props":1773,"children":1774},{},[1775],{"type":57,"value":1776},"#include \"DDSTextureLoader.h\"\n",{"type":51,"tag":195,"props":1778,"children":1779},{"class":197,"line":208},[1780],{"type":51,"tag":195,"props":1781,"children":1782},{},[1783],{"type":57,"value":1784},"#include \"ResourceUploadBatch.h\"\n",{"type":51,"tag":195,"props":1786,"children":1787},{"class":197,"line":253},[1788],{"type":51,"tag":195,"props":1789,"children":1790},{},[1791],{"type":57,"value":1792},"#include \"DescriptorHeap.h\"\n",{"type":51,"tag":195,"props":1794,"children":1795},{"class":197,"line":279},[1796],{"type":51,"tag":195,"props":1797,"children":1798},{"emptyLinePlaceholder":1502},[1799],{"type":57,"value":1505},{"type":51,"tag":195,"props":1801,"children":1802},{"class":197,"line":301},[1803],{"type":51,"tag":195,"props":1804,"children":1805},{},[1806],{"type":57,"value":1708},{"type":51,"tag":195,"props":1808,"children":1809},{"class":197,"line":322},[1810],{"type":51,"tag":195,"props":1811,"children":1812},{},[1813],{"type":57,"value":1716},{"type":51,"tag":195,"props":1815,"children":1816},{"class":197,"line":339},[1817],{"type":51,"tag":195,"props":1818,"children":1819},{"emptyLinePlaceholder":1502},[1820],{"type":57,"value":1505},{"type":51,"tag":195,"props":1822,"children":1823},{"class":197,"line":348},[1824],{"type":51,"tag":195,"props":1825,"children":1826},{},[1827],{"type":57,"value":1828},"Microsoft::WRL::ComPtr\u003CID3D12Resource> texture;\n",{"type":51,"tag":195,"props":1830,"children":1831},{"class":197,"line":543},[1832],{"type":51,"tag":195,"props":1833,"children":1834},{},[1835],{"type":57,"value":1836},"CreateDDSTextureFromFile(device, upload, L\"texture.dds\", texture.ReleaseAndGetAddressOf());\n",{"type":51,"tag":195,"props":1838,"children":1839},{"class":197,"line":568},[1840],{"type":51,"tag":195,"props":1841,"children":1842},{"emptyLinePlaceholder":1502},[1843],{"type":57,"value":1505},{"type":51,"tag":195,"props":1845,"children":1846},{"class":197,"line":586},[1847],{"type":51,"tag":195,"props":1848,"children":1849},{},[1850],{"type":57,"value":1732},{"type":51,"tag":164,"props":1852,"children":1854},{"id":1853},"input-handling",[1855],{"type":57,"value":1856},"Input Handling",{"type":51,"tag":184,"props":1858,"children":1860},{"className":1482,"code":1859,"language":1484,"meta":189,"style":189},"#include \"Keyboard.h\"\n#include \"Mouse.h\"\n#include \"GamePad.h\"\n\nauto keyboard = std::make_unique\u003CDirectX::Keyboard>();\nauto mouse = std::make_unique\u003CDirectX::Mouse>();\nauto gamePad = std::make_unique\u003CDirectX::GamePad>();\n\n\u002F\u002F In update loop\nauto kb = keyboard->GetState();\nif (kb.Escape)\n    PostQuitMessage(0);\n\nauto pad = gamePad->GetState(0);\nif (pad.IsConnected())\n{\n    if (pad.IsAPressed())\n        \u002F* jump *\u002F;\n}\n",[1861],{"type":51,"tag":128,"props":1862,"children":1863},{"__ignoreMap":189},[1864,1872,1880,1888,1895,1903,1911,1919,1926,1934,1942,1950,1958,1965,1973,1981,1989,1998,2007],{"type":51,"tag":195,"props":1865,"children":1866},{"class":197,"line":198},[1867],{"type":51,"tag":195,"props":1868,"children":1869},{},[1870],{"type":57,"value":1871},"#include \"Keyboard.h\"\n",{"type":51,"tag":195,"props":1873,"children":1874},{"class":197,"line":208},[1875],{"type":51,"tag":195,"props":1876,"children":1877},{},[1878],{"type":57,"value":1879},"#include \"Mouse.h\"\n",{"type":51,"tag":195,"props":1881,"children":1882},{"class":197,"line":253},[1883],{"type":51,"tag":195,"props":1884,"children":1885},{},[1886],{"type":57,"value":1887},"#include \"GamePad.h\"\n",{"type":51,"tag":195,"props":1889,"children":1890},{"class":197,"line":279},[1891],{"type":51,"tag":195,"props":1892,"children":1893},{"emptyLinePlaceholder":1502},[1894],{"type":57,"value":1505},{"type":51,"tag":195,"props":1896,"children":1897},{"class":197,"line":301},[1898],{"type":51,"tag":195,"props":1899,"children":1900},{},[1901],{"type":57,"value":1902},"auto keyboard = std::make_unique\u003CDirectX::Keyboard>();\n",{"type":51,"tag":195,"props":1904,"children":1905},{"class":197,"line":322},[1906],{"type":51,"tag":195,"props":1907,"children":1908},{},[1909],{"type":57,"value":1910},"auto mouse = std::make_unique\u003CDirectX::Mouse>();\n",{"type":51,"tag":195,"props":1912,"children":1913},{"class":197,"line":339},[1914],{"type":51,"tag":195,"props":1915,"children":1916},{},[1917],{"type":57,"value":1918},"auto gamePad = std::make_unique\u003CDirectX::GamePad>();\n",{"type":51,"tag":195,"props":1920,"children":1921},{"class":197,"line":348},[1922],{"type":51,"tag":195,"props":1923,"children":1924},{"emptyLinePlaceholder":1502},[1925],{"type":57,"value":1505},{"type":51,"tag":195,"props":1927,"children":1928},{"class":197,"line":543},[1929],{"type":51,"tag":195,"props":1930,"children":1931},{},[1932],{"type":57,"value":1933},"\u002F\u002F In update loop\n",{"type":51,"tag":195,"props":1935,"children":1936},{"class":197,"line":568},[1937],{"type":51,"tag":195,"props":1938,"children":1939},{},[1940],{"type":57,"value":1941},"auto kb = keyboard->GetState();\n",{"type":51,"tag":195,"props":1943,"children":1944},{"class":197,"line":586},[1945],{"type":51,"tag":195,"props":1946,"children":1947},{},[1948],{"type":57,"value":1949},"if (kb.Escape)\n",{"type":51,"tag":195,"props":1951,"children":1952},{"class":197,"line":595},[1953],{"type":51,"tag":195,"props":1954,"children":1955},{},[1956],{"type":57,"value":1957},"    PostQuitMessage(0);\n",{"type":51,"tag":195,"props":1959,"children":1960},{"class":197,"line":604},[1961],{"type":51,"tag":195,"props":1962,"children":1963},{"emptyLinePlaceholder":1502},[1964],{"type":57,"value":1505},{"type":51,"tag":195,"props":1966,"children":1967},{"class":197,"line":612},[1968],{"type":51,"tag":195,"props":1969,"children":1970},{},[1971],{"type":57,"value":1972},"auto pad = gamePad->GetState(0);\n",{"type":51,"tag":195,"props":1974,"children":1975},{"class":197,"line":879},[1976],{"type":51,"tag":195,"props":1977,"children":1978},{},[1979],{"type":57,"value":1980},"if (pad.IsConnected())\n",{"type":51,"tag":195,"props":1982,"children":1984},{"class":197,"line":1983},16,[1985],{"type":51,"tag":195,"props":1986,"children":1987},{},[1988],{"type":57,"value":205},{"type":51,"tag":195,"props":1990,"children":1992},{"class":197,"line":1991},17,[1993],{"type":51,"tag":195,"props":1994,"children":1995},{},[1996],{"type":57,"value":1997},"    if (pad.IsAPressed())\n",{"type":51,"tag":195,"props":1999,"children":2001},{"class":197,"line":2000},18,[2002],{"type":51,"tag":195,"props":2003,"children":2004},{},[2005],{"type":57,"value":2006},"        \u002F* jump *\u002F;\n",{"type":51,"tag":195,"props":2008,"children":2010},{"class":197,"line":2009},19,[2011],{"type":51,"tag":195,"props":2012,"children":2013},{},[2014],{"type":57,"value":354},{"type":51,"tag":164,"props":2016,"children":2018},{"id":2017},"audio",[2019],{"type":57,"value":2020},"Audio",{"type":51,"tag":184,"props":2022,"children":2024},{"className":1482,"code":2023,"language":1484,"meta":189,"style":189},"#include \"Audio.h\"\n\n\u002F\u002F Create audio engine\nauto audioEngine = std::make_unique\u003CDirectX::AudioEngine>();\n\n\u002F\u002F Load and play a sound\nauto soundEffect = std::make_unique\u003CDirectX::SoundEffect>(audioEngine.get(), L\"explosion.wav\");\nsoundEffect->Play();\n\n\u002F\u002F Per-frame update\naudioEngine->Update();\n",[2025],{"type":51,"tag":128,"props":2026,"children":2027},{"__ignoreMap":189},[2028,2036,2043,2051,2059,2066,2074,2082,2090,2097,2105],{"type":51,"tag":195,"props":2029,"children":2030},{"class":197,"line":198},[2031],{"type":51,"tag":195,"props":2032,"children":2033},{},[2034],{"type":57,"value":2035},"#include \"Audio.h\"\n",{"type":51,"tag":195,"props":2037,"children":2038},{"class":197,"line":208},[2039],{"type":51,"tag":195,"props":2040,"children":2041},{"emptyLinePlaceholder":1502},[2042],{"type":57,"value":1505},{"type":51,"tag":195,"props":2044,"children":2045},{"class":197,"line":253},[2046],{"type":51,"tag":195,"props":2047,"children":2048},{},[2049],{"type":57,"value":2050},"\u002F\u002F Create audio engine\n",{"type":51,"tag":195,"props":2052,"children":2053},{"class":197,"line":279},[2054],{"type":51,"tag":195,"props":2055,"children":2056},{},[2057],{"type":57,"value":2058},"auto audioEngine = std::make_unique\u003CDirectX::AudioEngine>();\n",{"type":51,"tag":195,"props":2060,"children":2061},{"class":197,"line":301},[2062],{"type":51,"tag":195,"props":2063,"children":2064},{"emptyLinePlaceholder":1502},[2065],{"type":57,"value":1505},{"type":51,"tag":195,"props":2067,"children":2068},{"class":197,"line":322},[2069],{"type":51,"tag":195,"props":2070,"children":2071},{},[2072],{"type":57,"value":2073},"\u002F\u002F Load and play a sound\n",{"type":51,"tag":195,"props":2075,"children":2076},{"class":197,"line":339},[2077],{"type":51,"tag":195,"props":2078,"children":2079},{},[2080],{"type":57,"value":2081},"auto soundEffect = std::make_unique\u003CDirectX::SoundEffect>(audioEngine.get(), L\"explosion.wav\");\n",{"type":51,"tag":195,"props":2083,"children":2084},{"class":197,"line":348},[2085],{"type":51,"tag":195,"props":2086,"children":2087},{},[2088],{"type":57,"value":2089},"soundEffect->Play();\n",{"type":51,"tag":195,"props":2091,"children":2092},{"class":197,"line":543},[2093],{"type":51,"tag":195,"props":2094,"children":2095},{"emptyLinePlaceholder":1502},[2096],{"type":57,"value":1505},{"type":51,"tag":195,"props":2098,"children":2099},{"class":197,"line":568},[2100],{"type":51,"tag":195,"props":2101,"children":2102},{},[2103],{"type":57,"value":2104},"\u002F\u002F Per-frame update\n",{"type":51,"tag":195,"props":2106,"children":2107},{"class":197,"line":586},[2108],{"type":51,"tag":195,"props":2109,"children":2110},{},[2111],{"type":57,"value":2112},"audioEngine->Update();\n",{"type":51,"tag":2114,"props":2115,"children":2116},"blockquote",{},[2117],{"type":51,"tag":67,"props":2118,"children":2119},{},[2120,2125,2127,2133,2135,2140],{"type":51,"tag":89,"props":2121,"children":2122},{},[2123],{"type":57,"value":2124},"Note",{"type":57,"value":2126},": Code examples above are simplified for clarity. Consult the ",{"type":51,"tag":97,"props":2128,"children":2130},{"href":1129,"rel":2129},[100],[2131],{"type":57,"value":2132},"wiki tutorials",{"type":57,"value":2134}," and public headers in ",{"type":51,"tag":128,"props":2136,"children":2138},{"className":2137},[],[2139],{"type":57,"value":1249},{"type":57,"value":2141}," for complete working code with all required parameters.",{"type":51,"tag":60,"props":2143,"children":2145},{"id":2144},"further-reading",[2146],{"type":57,"value":2147},"Further Reading",{"type":51,"tag":81,"props":2149,"children":2150},{},[2151,2160,2170,2180],{"type":51,"tag":85,"props":2152,"children":2153},{},[2154],{"type":51,"tag":97,"props":2155,"children":2157},{"href":114,"rel":2156},[100],[2158],{"type":57,"value":2159},"DirectXTK Wiki",{"type":51,"tag":85,"props":2161,"children":2162},{},[2163],{"type":51,"tag":97,"props":2164,"children":2167},{"href":2165,"rel":2166},"https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FDirectXTK\u002Fwiki\u002FAudio",[100],[2168],{"type":57,"value":2169},"DirectX Tool Kit for Audio",{"type":51,"tag":85,"props":2171,"children":2172},{},[2173],{"type":51,"tag":97,"props":2174,"children":2177},{"href":2175,"rel":2176},"https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FDirectXTK\u002Fwiki\u002FSimpleMath",[100],[2178],{"type":57,"value":2179},"SimpleMath documentation",{"type":51,"tag":85,"props":2181,"children":2182},{},[2183],{"type":51,"tag":97,"props":2184,"children":2186},{"href":1025,"rel":2185},[100],[2187],{"type":57,"value":2188},"Project templates",{"type":51,"tag":2190,"props":2191,"children":2192},"style",{},[2193],{"type":57,"value":2194},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2196,"total":2391},[2197,2219,2240,2261,2276,2293,2304,2317,2332,2347,2366,2379],{"slug":2198,"name":2198,"fn":2199,"description":2200,"org":2201,"tags":2202,"stars":2216,"repoUrl":2217,"updatedAt":2218},"rushstack-best-practices","manage Rush monorepos with best practices","Provides best practices and guidance for working with Rush monorepos. Use when the user is working in a Rush-based repository, asks about Rush commands (install, update, build, rebuild), needs help with project selection, dependency management, build caching, subspace configuration, or troubleshooting Rush-specific issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2203,2206,2209,2210,2213],{"name":2204,"slug":2205,"type":15},"Engineering","engineering",{"name":2207,"slug":2208,"type":15},"Local Development","local-development",{"name":9,"slug":8,"type":15},{"name":2211,"slug":2212,"type":15},"Project Management","project-management",{"name":2214,"slug":2215,"type":15},"Rush","rush",6484,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frushstack","2026-04-06T18:34:44.965032",{"slug":2220,"name":2220,"fn":2221,"description":2222,"org":2223,"tags":2224,"stars":2237,"repoUrl":2238,"updatedAt":2239},"azure-ai-agents-persistent-dotnet","build AI agents with Azure .NET SDK","Azure AI Agents Persistent SDK for .NET. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools. Use for agent CRUD, conversation threads, streaming responses, function calling, file search, and code interpreter. Triggers: \"PersistentAgentsClient\", \"persistent agents\", \"agent threads\", \"agent runs\", \"streaming agents\", \"function calling agents .NET\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2225,2228,2231,2234],{"name":2226,"slug":2227,"type":15},".NET","net",{"name":2229,"slug":2230,"type":15},"Agents","agents",{"name":2232,"slug":2233,"type":15},"Azure","azure",{"name":2235,"slug":2236,"type":15},"LLM","llm",2804,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","2026-07-03T16:32:10.297433",{"slug":2241,"name":2241,"fn":2242,"description":2243,"org":2244,"tags":2245,"stars":2237,"repoUrl":2238,"updatedAt":2260},"azure-ai-anomalydetector-java","build anomaly detection applications with Java","Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate\u002Fmultivariate anomaly detection, time-series analysis, or AI-powered monitoring.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2246,2249,2250,2253,2256,2257],{"name":2247,"slug":2248,"type":15},"Analytics","analytics",{"name":2232,"slug":2233,"type":15},{"name":2251,"slug":2252,"type":15},"Data Analysis","data-analysis",{"name":2254,"slug":2255,"type":15},"Java","java",{"name":9,"slug":8,"type":15},{"name":2258,"slug":2259,"type":15},"Monitoring","monitoring","2026-05-13T06:14:16.261754",{"slug":2262,"name":2262,"fn":2263,"description":2264,"org":2265,"tags":2266,"stars":2237,"repoUrl":2238,"updatedAt":2275},"azure-ai-contentsafety-java","build content moderation applications with Azure AI","Build content moderation applications with Azure AI Content Safety SDK for Java. Use when implementing text\u002Fimage analysis, blocklist management, or harm detection for hate, violence, sexual content, and self-harm.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2267,2270,2271,2272],{"name":2268,"slug":2269,"type":15},"AI Infrastructure","ai-infrastructure",{"name":2232,"slug":2233,"type":15},{"name":2254,"slug":2255,"type":15},{"name":2273,"slug":2274,"type":15},"Security","security","2026-07-07T06:53:31.293235",{"slug":2277,"name":2277,"fn":2278,"description":2279,"org":2280,"tags":2281,"stars":2237,"repoUrl":2238,"updatedAt":2292},"azure-ai-contentsafety-py","detect harmful content with Azure AI Content Safety","Azure AI Content Safety SDK for Python. Use for detecting harmful content in text and images with multi-severity classification.\nTriggers: \"azure-ai-contentsafety\", \"ContentSafetyClient\", \"content moderation\", \"harmful content\", \"text analysis\", \"image analysis\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2282,2283,2286,2287,2288,2291],{"name":2232,"slug":2233,"type":15},{"name":2284,"slug":2285,"type":15},"Compliance","compliance",{"name":2235,"slug":2236,"type":15},{"name":9,"slug":8,"type":15},{"name":2289,"slug":2290,"type":15},"Python","python",{"name":2273,"slug":2274,"type":15},"2026-07-18T05:14:23.017504",{"slug":2294,"name":2294,"fn":2295,"description":2296,"org":2297,"tags":2298,"stars":2237,"repoUrl":2238,"updatedAt":2303},"azure-ai-language-conversations-py","implement conversational language understanding with Python","Implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations Python SDK. Use when working with ConversationAnalysisClient to analyze conversation intent and entities, building NLP features, or integrating language understanding into applications.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2299,2300,2301,2302],{"name":2247,"slug":2248,"type":15},{"name":2232,"slug":2233,"type":15},{"name":2235,"slug":2236,"type":15},{"name":2289,"slug":2290,"type":15},"2026-07-31T05:54:29.068751",{"slug":2305,"name":2305,"fn":2306,"description":2307,"org":2308,"tags":2309,"stars":2237,"repoUrl":2238,"updatedAt":2316},"azure-ai-translation-text-py","translate text using Azure AI services","Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications.\nTriggers: \"text translation\", \"translator\", \"translate text\", \"transliterate\", \"TextTranslationClient\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2310,2313,2314,2315],{"name":2311,"slug":2312,"type":15},"API Development","api-development",{"name":2232,"slug":2233,"type":15},{"name":9,"slug":8,"type":15},{"name":2289,"slug":2290,"type":15},"2026-07-18T05:14:16.988376",{"slug":2318,"name":2318,"fn":2319,"description":2320,"org":2321,"tags":2322,"stars":2237,"repoUrl":2238,"updatedAt":2331},"azure-ai-vision-imageanalysis-py","analyze images with Azure AI Vision","Azure AI Vision Image Analysis SDK for captions, tags, objects, OCR, people detection, and smart cropping. Use for computer vision and image understanding tasks.\nTriggers: \"image analysis\", \"computer vision\", \"OCR\", \"object detection\", \"ImageAnalysisClient\", \"image caption\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2323,2324,2327,2330],{"name":2232,"slug":2233,"type":15},{"name":2325,"slug":2326,"type":15},"Computer Vision","computer-vision",{"name":2328,"slug":2329,"type":15},"Images","images",{"name":2289,"slug":2290,"type":15},"2026-07-18T05:14:18.007737",{"slug":2333,"name":2333,"fn":2334,"description":2335,"org":2336,"tags":2337,"stars":2237,"repoUrl":2238,"updatedAt":2346},"azure-appconfiguration-java","manage configuration with Azure App Configuration","Azure App Configuration SDK for Java. Centralized application configuration management with key-value settings, feature flags, and snapshots.\nTriggers: \"ConfigurationClient java\", \"app configuration java\", \"feature flag java\", \"configuration setting java\", \"azure config java\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2338,2339,2342,2345],{"name":2232,"slug":2233,"type":15},{"name":2340,"slug":2341,"type":15},"Configuration","configuration",{"name":2343,"slug":2344,"type":15},"Feature Flags","feature-flags",{"name":2254,"slug":2255,"type":15},"2026-07-03T16:32:01.278468",{"slug":2348,"name":2348,"fn":2349,"description":2350,"org":2351,"tags":2352,"stars":2237,"repoUrl":2238,"updatedAt":2365},"azure-cosmos-rust","build applications with Azure Cosmos DB","Azure Cosmos DB library for Rust (NoSQL API). Document CRUD, containers, and globally distributed data.\nTriggers: \"cosmos db rust\", \"CosmosClient rust\", \"document crud rust\", \"NoSQL rust\", \"partition key rust\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2353,2356,2359,2362],{"name":2354,"slug":2355,"type":15},"Cosmos DB","cosmos-db",{"name":2357,"slug":2358,"type":15},"Database","database",{"name":2360,"slug":2361,"type":15},"NoSQL","nosql",{"name":2363,"slug":2364,"type":15},"Rust","rust","2026-07-31T05:54:27.021432",{"slug":2367,"name":2367,"fn":2349,"description":2368,"org":2369,"tags":2370,"stars":2237,"repoUrl":2238,"updatedAt":2378},"azure-cosmos-ts","Azure Cosmos DB JavaScript\u002FTypeScript SDK (@azure\u002Fcosmos) for data plane operations. Use for CRUD operations on documents, queries, bulk operations, and container management. Triggers: \"Cosmos DB\", \"@azure\u002Fcosmos\", \"CosmosClient\", \"document CRUD\", \"NoSQL queries\", \"bulk operations\", \"partition key\", \"container.items\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2371,2372,2373,2374,2375],{"name":2354,"slug":2355,"type":15},{"name":2357,"slug":2358,"type":15},{"name":9,"slug":8,"type":15},{"name":2360,"slug":2361,"type":15},{"name":2376,"slug":2377,"type":15},"TypeScript","typescript","2026-07-03T16:31:19.368382",{"slug":2380,"name":2380,"fn":2381,"description":2382,"org":2383,"tags":2384,"stars":2237,"repoUrl":2238,"updatedAt":2390},"azure-data-tables-java","build table storage applications with Java","Build table storage applications with Azure Tables SDK for Java. Use when working with Azure Table Storage or Cosmos DB Table API for NoSQL key-value data, schemaless storage, or structured data at scale.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2385,2386,2387,2388,2389],{"name":2232,"slug":2233,"type":15},{"name":2354,"slug":2355,"type":15},{"name":2357,"slug":2358,"type":15},{"name":2254,"slug":2255,"type":15},{"name":2360,"slug":2361,"type":15},"2026-05-13T06:14:17.582229",267,{"items":2393,"total":198},[2394],{"slug":4,"name":4,"fn":5,"description":6,"org":2395,"tags":2396,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2397,2398,2399,2400],{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15}]