All Projects → microsoft → Directx Headers

microsoft / Directx Headers

Licence: mit
Official DirectX headers available under an open source license

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Directx Headers

Awesome D3d12
Awesome D3D12 ecosystem
Stars: ✭ 130 (-24.86%)
Mutual labels:  microsoft, directx, d3d12
Directxmath
DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
Stars: ✭ 859 (+396.53%)
Mutual labels:  microsoft, directx
Dx12 Game Programming
DirectX 12 C# samples from Frank D. Luna's book "Introduction to 3D Game Programming with Direct3D 12.0"
Stars: ✭ 156 (-9.83%)
Mutual labels:  directx, d3d12
Directxtex
DirectXTex texture processing library
Stars: ✭ 1,039 (+500.58%)
Mutual labels:  microsoft, directx
Renderdoc
RenderDoc is a stand-alone graphics debugging tool.
Stars: ✭ 5,969 (+3350.29%)
Mutual labels:  directx, d3d12
Directxtk12
The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
Stars: ✭ 765 (+342.2%)
Mutual labels:  microsoft, directx
Walbourn.github.io
Games for Windows and the DirectX SDK blog
Stars: ✭ 45 (-73.99%)
Mutual labels:  microsoft, directx
Fx11
Effects for Direct3D 11 (FX11) is a management runtime for authoring HLSL shaders, render state, and runtime variables together.
Stars: ✭ 365 (+110.98%)
Mutual labels:  microsoft, directx
Dgvoodoo2
Glide/DirectX implementation on D3D11/12
Stars: ✭ 137 (-20.81%)
Mutual labels:  directx, d3d12
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+5826.01%)
Mutual labels:  directx, d3d12
Windows Subsystem For Linux Setup Guide
An in-depth Guide for getting started with the Windows Subsystem for Linux!
Stars: ✭ 565 (+226.59%)
Mutual labels:  microsoft, wsl
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (-20.23%)
Mutual labels:  directx, d3d12
Uvatlas
UVAtlas isochart texture atlas
Stars: ✭ 540 (+212.14%)
Mutual labels:  microsoft, directx
D912pxy
DirectX9 to DirectX12 API proxy for Guild Wars 2
Stars: ✭ 833 (+381.5%)
Mutual labels:  directx, d3d12
Directxmesh
DirectXMesh geometry processing library
Stars: ✭ 447 (+158.38%)
Mutual labels:  microsoft, directx
Llgl
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
Stars: ✭ 1,011 (+484.39%)
Mutual labels:  directx, d3d12
Awesome Wsl
Awesome list dedicated to Windows Subsystem for Linux
Stars: ✭ 3,544 (+1948.55%)
Mutual labels:  microsoft, wsl
Dxut
DXUT is a "GLUT"-like framework for Direct3D 11.x Win32 desktop applications; primarily samples, demos, and prototypes.
Stars: ✭ 341 (+97.11%)
Mutual labels:  microsoft, directx
Castle Winbuntu
Homesick Castle for use on WSL.
Stars: ✭ 87 (-49.71%)
Mutual labels:  microsoft, wsl
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+1138.15%)
Mutual labels:  directx, d3d12

DirectX Headers

This repository hosts the official Direct3D 12 headers. These headers are made available under the MIT license rather than the traditional Windows SDK license.

Additionally, this repository hosts several helpers for using these headers.

Directory Structure

  • /: Build files are available here for quick integration. CMake is provided, and can be referenced either via subdirectory() or after installation to a system location. Meson is also available for inclusion as a subproject/wrap.
  • /include/directx: These files are the core headers for using D3D12, plus d3dx12.h, which is a helper and does not cross the boundaries of the D3D12 API.
  • /include/wsl: These files are provided as a shim to be able to include the D3D12 headers from a Linux build environment, without requiring the rest of the Windows SDK.
  • /include/dxguids: This header allows an application to use uuidof<T>() consistently between Windows and WSL, instead of __uuidof().
  • /src/dxguids.cpp: This cpp file can be used as a replacement for linking against dxguid.lib on Windows, and as a convenient translation unit to define GUIDs without multiple definitions for WSL.
  • /test: Simple CMake/Meson projects for validating the headers can be included in a given environment

Use on Windows

Note that these headers may conflict with the headers from the Windows SDK, depending on include ordering. These headers should be added to the include directory list before the SDK, and should be included before other graphics headers (e.g. d3d11.h) from the Windows SDK. Otherwise, the corresponding header from the Windows SDK may be included first, and will define the include guards which prevents these headers from being used.

Use on WSL

Note: WSL support is not intended for general purpose application development. At this time, the only recommended usage is for frameworks wishing to provide hardware acceleration for a Linux graphics/compute API in a WSL2 virtualization environment.

Note: WSL support is only available for 64-bit binaries.

The headers in the /include/wsl directory provide alternative definitions to macros and typedefs normally found in the Windows SDK. For the most part, they should be straightforward, but there are a couple to call attention to:

Type Reason
LONG/ULONG On 64-bit Windows, a long is 4 bytes, but on Linux it is typically 8 bytes. The D3D12 ABI for WSL uses long and therefore these should be 8 bytes.
WCHAR/WCSTR On Windows, a wchar_t is 2 bytes, but on Linux it is typically 4 bytes. The D3D12 ABI for WSL uses the native 4-byte wchar_t, to enable applications and the runtime to use the system C library to perform string manipulation.

Additionally, APIs taking HANDLE (void*) for Win32 types should instead use reinterpret_cast<HANDLE>(fd) for an appropriate type of file descriptor. For ID3D12Fence::SetEventOnCompletion this should be an eventfd, and for shared resources will be an opaque fd.

Ways to consume

There are various ways to consume the headers in this project:

  • Manually: Just copy the headers somewhere and point your project at them.
  • CMake subproject: Add this entire project as a subdirectory of your larger project, e.g. as a git submodule, and add_subdirectory into it. Use the resulting DirectX-Headers and/or DirectX-Guids targets as a link dependency
  • Installed CMake: After building/installing this project, it can be found through CMake's find_package functionality and will expose the same DirectX-Headers and DirectX-Guids targets.
  • Meson subproject/wrap: Add this entire project as a subproject of your larger project, and use subproject or dependency to consume it.
  • Pkg-config: Use Meson to build this project, and the resulting installed package can be found via pkg-config.
  • vcpkg: A vcpkg port has been added.

Contributions for new mechanisms are welcome.

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 [email protected] 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].