Ralith / openxrs

OpenXR bindings for Rust
Apache License 2.0
282 stars 59 forks source link

Add features for layer development #120

Closed Sorenon closed 2 years ago

Sorenon commented 2 years ago

This makes two minor changes to make openxrs more practical for developing an OpenXR layer.

Adding Hash to raw handle types makes it simpler to manage all the tracked handles like so:

static mut INSTANCE_WRAPPERS: OnceCell<DashMap<xr::Instance, Arc<instance::InstanceWrapper>>> = OnceCell::new();

And the added bindings from loader_interfaces.h are used for Runtime-Loader-Layer negotiation.

Sorenon commented 2 years ago

Thanks! Would it make sense to generate these, rather than hand-writing them?

Since the file is so small and not defined by XML I think that writing a generator would be overkill.

Ralith commented 2 years ago

Ah, yeah, if there's no XML source then the effort isn't justified. Nice job keeping the style consistent!

Ralith commented 2 years ago

Sorry this languished; Actions bugged out somehow.