cd examples

cargo run -p wsg-examples
This commit is contained in:
jerome
2026-07-03 14:46:59 +02:00
parent f46209a43c
commit 039f113831
7 changed files with 2675 additions and 420 deletions
+17
View File
@@ -0,0 +1,17 @@
use std::sync::Arc;
use winit::event_loop::EventLoop;
use winit::window::WindowBuilder;
use wsg_lib::context::Context;
fn main() {
let event_loop = EventLoop::new().unwrap();
let window = Arc::new(WindowBuilder::new().build(&event_loop).unwrap());
// Utilisation de pollster pour le bloc async
let context = pollster::block_on(Context::new(window.clone()));
match context {
Ok(_) => println!("Succès : WGPU context initialisé !"),
Err(e) => eprintln!("Erreur lors de l'initialisation : {:?}", e),
}
}