mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 00:41:07 +01:00
914d782007e8e4a11f563fa801a4107978657288
9: Add structs and enums for ID3D12Heap r=msiglreith a=DethRaid I've added the structs and enums needed to create an `ID3D12Heap`. I've also added the method `create_heap` to `Device`, and and added the module imports and reexports to the appropriate places The weird thing here is `heap::Flags`. Thing is, D3D12 uses the value 0 for two of the enum constants in `D3D12_HEAP_FLAGS`. Rust does not allow the same value to be used by multiple enum constants (that I know of). I made an enum without any useful values, then gave it constants with the values from `D3D12_HEAP_FLAGS`. This lets my code compile, and the syntax to use the enum is the same, but the compiler complains about capitalization and I don't really like it. I'd welcome any ideas about a better way to implement this Co-authored-by: David Dubois <dexcelstraun7@gmail.com>
d3d12-rs
Rust wrapper for D3D12
Description
A cross-platform, safe, pure-Rust graphics API.
92 MiB
0 Stars
1 Watchers
0 Forks
Languages
Rust
78.5%
WGSL
13%
GLSL
3.1%
Metal
2.8%
HLSL
2.3%
Other
0.2%