update to wgpu 0.19.0
This commit is contained in:
parent
3425efd522
commit
65825aa0d4
2 changed files with 10 additions and 6 deletions
|
@ -8,7 +8,7 @@ repository = "https://github.com/grovesNL/glyphon"
|
||||||
license = "MIT OR Apache-2.0 OR Zlib"
|
license = "MIT OR Apache-2.0 OR Zlib"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wgpu = "0.18"
|
wgpu = "0.19"
|
||||||
etagere = "0.2.10"
|
etagere = "0.2.10"
|
||||||
cosmic-text = "0.10"
|
cosmic-text = "0.10"
|
||||||
lru = "0.12.1"
|
lru = "0.12.1"
|
||||||
|
|
|
@ -15,6 +15,8 @@ use winit::{
|
||||||
window::WindowBuilder,
|
window::WindowBuilder,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
pollster::block_on(run());
|
pollster::block_on(run());
|
||||||
}
|
}
|
||||||
|
@ -23,11 +25,11 @@ async fn run() {
|
||||||
// Set up window
|
// Set up window
|
||||||
let (width, height) = (800, 600);
|
let (width, height) = (800, 600);
|
||||||
let event_loop = EventLoop::new().unwrap();
|
let event_loop = EventLoop::new().unwrap();
|
||||||
let window = WindowBuilder::new()
|
let window = Arc::new(WindowBuilder::new()
|
||||||
.with_inner_size(LogicalSize::new(width as f64, height as f64))
|
.with_inner_size(LogicalSize::new(width as f64, height as f64))
|
||||||
.with_title("glyphon hello world")
|
.with_title("glyphon hello world")
|
||||||
.build(&event_loop)
|
.build(&event_loop)
|
||||||
.unwrap();
|
.unwrap());
|
||||||
let size = window.inner_size();
|
let size = window.inner_size();
|
||||||
let scale_factor = window.scale_factor();
|
let scale_factor = window.scale_factor();
|
||||||
|
|
||||||
|
@ -41,14 +43,15 @@ async fn run() {
|
||||||
.request_device(
|
.request_device(
|
||||||
&DeviceDescriptor {
|
&DeviceDescriptor {
|
||||||
label: None,
|
label: None,
|
||||||
features: Features::empty(),
|
required_features: Features::empty(),
|
||||||
limits: Limits::downlevel_defaults(),
|
required_limits: Limits::downlevel_defaults(),
|
||||||
},
|
},
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let surface = unsafe { instance.create_surface(&window) }.expect("Create surface");
|
|
||||||
|
let surface = instance.create_surface(window.clone()).expect("Create surface");
|
||||||
let swapchain_format = TextureFormat::Bgra8UnormSrgb;
|
let swapchain_format = TextureFormat::Bgra8UnormSrgb;
|
||||||
let mut config = SurfaceConfiguration {
|
let mut config = SurfaceConfiguration {
|
||||||
usage: TextureUsages::RENDER_ATTACHMENT,
|
usage: TextureUsages::RENDER_ATTACHMENT,
|
||||||
|
@ -58,6 +61,7 @@ async fn run() {
|
||||||
present_mode: PresentMode::Fifo,
|
present_mode: PresentMode::Fifo,
|
||||||
alpha_mode: CompositeAlphaMode::Opaque,
|
alpha_mode: CompositeAlphaMode::Opaque,
|
||||||
view_formats: vec![],
|
view_formats: vec![],
|
||||||
|
desired_maximum_frame_latency: 2,
|
||||||
};
|
};
|
||||||
surface.configure(&device, &config);
|
surface.configure(&device, &config);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue