Improve the consistency of identifiers (#5108)

This commit is contained in:
John-John Tedro authored and GitHub committed 2024-01-29 10:56:04 +01:00
1 parent 4face1c2ba
commit dec6ea5ea4
31 files changed
+687 -572

No files matched your search

+6 -7
View File
@@ -61,7 +61,7 @@ fn main() {
global.instance_create_surface(
window.display_handle().unwrap().into(),
window.window_handle().unwrap().into(),
wgc::id::TypedId::zip(0, 1, wgt::Backend::Empty),
wgc::id::Id::zip(0, 1, wgt::Backend::Empty),
)
}
.unwrap();
@@ -79,22 +79,21 @@ fn main() {
#[cfg(not(feature = "winit"))]
compatible_surface: None,
},
wgc::instance::AdapterInputs::IdSet(
&[wgc::id::TypedId::zip(0, 0, backend)],
|id| id.backend(),
),
wgc::instance::AdapterInputs::IdSet(&[wgc::id::Id::zip(0, 0, backend)], |id| {
id.backend()
}),
)
.expect("Unable to find an adapter for selected backend");
let info = gfx_select!(adapter => global.adapter_get_info(adapter)).unwrap();
log::info!("Picked '{}'", info.name);
let id = wgc::id::TypedId::zip(1, 0, backend);
let id = wgc::id::Id::zip(1, 0, backend);
let (_, _, error) = gfx_select!(adapter => global.adapter_request_device(
adapter,
&desc,
None,
id,
id
id.transmute()
));
if let Some(e) = error {
panic!("{:?}", e);