#d3d12 #api-bindings

oxidx

Low-level D3D12 wrapper for Rust

9 releases (5 breaking)

0.6.0 Oct 25, 2024
0.5.0 Oct 9, 2024
0.4.0 Sep 17, 2024
0.3.2 Aug 27, 2024
0.1.1 Aug 6, 2024

#277 in Graphics APIs

Download history 184/week @ 2024-08-01 36/week @ 2024-08-08 279/week @ 2024-08-15 420/week @ 2024-08-22 56/week @ 2024-08-29 138/week @ 2024-09-12 42/week @ 2024-09-19 15/week @ 2024-09-26 93/week @ 2024-10-03 71/week @ 2024-10-10 4/week @ 2024-10-17 100/week @ 2024-10-24 8/week @ 2024-10-31 2/week @ 2024-11-07

116 downloads per month

MIT license

690KB
10K SLoC

Contains (Windows DLL, 59KB) WinPixEventRuntime.dll, (Windows DLL, 59KB) WinPixEventRuntime.dll, (static library, 7KB) WinPixEventRuntime.lib, (static library, 7KB) WinPixEventRuntime.lib

oxidx

This project provides low-level wrapper for D3D12 API.

Features

  • Provides a low-level API around DirectX 12. All methods correspond to DirectX 12 C++ methods, but they are done in a Rust way.
  • Based on official windows crate.
  • No library/runtime validation, only driver validation.
  • PIX methods.
  • D3D12 and DXGI prefixes have been stripped from all types.

Minimum supported Rust version

oxidx's MSRV is 1.80.

Examples

Device creation

let entry = Entry;

let factory: Factory4 = entry.create_factory(FactoryCreationFlags::empty())?;

let adapter = factory.enum_adapters(0)?;

let device: Device = entry
    .create_device(&adapter, FeatureLevel::Level11)
    .unwrap();

Feature fetching

let mut options = Options1Feature::default();
device.check_feature_support(&mut options)?;

Dependencies

~128MB
~2M SLoC