Use default limits for example (#98)

This commit is contained in:
Josh Groves 2024-05-27 00:04:17 -02:30 committed by GitHub
parent 0fdbd90c55
commit 2a45708767
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,11 +2,12 @@ use glyphon::{
Attrs, Buffer, Cache, Color, Family, FontSystem, Metrics, Resolution, Shaping, SwashCache,
TextArea, TextAtlas, TextBounds, TextRenderer, Viewport,
};
use std::sync::Arc;
use wgpu::{
CommandEncoderDescriptor, CompositeAlphaMode, DeviceDescriptor, Features, Instance,
InstanceDescriptor, Limits, LoadOp, MultisampleState, Operations, PresentMode,
RenderPassColorAttachment, RenderPassDescriptor, RequestAdapterOptions, SurfaceConfiguration,
TextureFormat, TextureUsages, TextureViewDescriptor,
CommandEncoderDescriptor, CompositeAlphaMode, DeviceDescriptor, Instance, InstanceDescriptor,
LoadOp, MultisampleState, Operations, PresentMode, RenderPassColorAttachment,
RenderPassDescriptor, RequestAdapterOptions, SurfaceConfiguration, TextureFormat,
TextureUsages, TextureViewDescriptor,
};
use winit::{
dpi::LogicalSize,
@ -15,8 +16,6 @@ use winit::{
window::WindowBuilder,
};
use std::sync::Arc;
fn main() {
pollster::block_on(run());
}
@ -42,14 +41,7 @@ async fn run() {
.await
.unwrap();
let (device, queue) = adapter
.request_device(
&DeviceDescriptor {
label: None,
required_features: Features::empty(),
required_limits: Limits::downlevel_defaults(),
},
None,
)
.request_device(&DeviceDescriptor::default(), None)
.await
.unwrap();