mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 16:31:11 +01:00
19 lines
420 B
Rust
19 lines
420 B
Rust
/// This example shows how to describe the adapter in use.
|
|
fn main() {
|
|
env_logger::init();
|
|
futures::executor::block_on(run());
|
|
}
|
|
|
|
async fn run() {
|
|
let adapter = wgpu::Adapter::request(
|
|
&wgpu::RequestAdapterOptions {
|
|
power_preference: wgpu::PowerPreference::Default,
|
|
},
|
|
wgpu::BackendBit::PRIMARY,
|
|
)
|
|
.await
|
|
.unwrap();
|
|
|
|
println!("{:?}", adapter.get_info())
|
|
}
|