mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
commit
942da778a3
|
@ -15,6 +15,7 @@ pollster = "0.2.5"
|
|||
# for picosvg
|
||||
roxmltree = "0.13"
|
||||
clap = { version = "4.1.0", features = ["derive"] }
|
||||
env_logger = "0.10.0"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
vello = { path = "../../", features = ["hot_reload"] }
|
||||
|
|
|
@ -225,6 +225,7 @@ enum UserEvent {
|
|||
|
||||
fn main() {
|
||||
let args = Args::parse();
|
||||
env_logger::init();
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
{
|
||||
use winit::{dpi::LogicalSize, window::WindowBuilder};
|
||||
|
|
13
src/util.rs
13
src/util.rs
|
@ -96,13 +96,12 @@ impl RenderContext {
|
|||
|
||||
/// Creates a compatible device handle id.
|
||||
async fn new_device(&mut self, compatible_surface: Option<&Surface>) -> Option<usize> {
|
||||
let adapter = self
|
||||
.instance
|
||||
.request_adapter(&RequestAdapterOptions {
|
||||
compatible_surface,
|
||||
..Default::default()
|
||||
})
|
||||
.await?;
|
||||
let adapter = wgpu::util::initialize_adapter_from_env_or_default(
|
||||
&self.instance,
|
||||
wgpu::Backends::PRIMARY,
|
||||
compatible_surface,
|
||||
)
|
||||
.await?;
|
||||
let features = adapter.features();
|
||||
let limits = Limits::default();
|
||||
let (device, queue) = adapter
|
||||
|
|
Loading…
Reference in a new issue