First vulkan init working

This commit is contained in:
Florian RICHER 2025-05-18 12:41:25 +02:00
parent 6639f0bb1e
commit 99be029ff8
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
4 changed files with 36 additions and 28 deletions

View file

@ -1,16 +1,13 @@
use std::sync::Arc;
use bevy_app::{App, PluginsState};
use bevy_ecs::{event, world::World};
use bevy_ecs::world::World;
use winit::{
application::ApplicationHandler, event::WindowEvent, event_loop::ActiveEventLoop,
window::WindowId,
};
use super::{
config::WindowConfig,
raw_handle::{DisplayHandleWrapper, WindowWrapper},
};
use super::{config::WindowConfig, raw_handle::WindowWrapper};
pub struct WindowState {
app: App,
@ -54,14 +51,14 @@ impl ApplicationHandler for WindowState {
if self.app.plugins_state() == PluginsState::Cleaned {
self.app.update();
}
let window_wrapper = self.app.world().get_resource::<WindowWrapper>().unwrap();
window_wrapper.0.request_redraw();
}
_ => {}
}
}
fn about_to_wait(&mut self, _event_loop: &ActiveEventLoop) {
let window_wrapper = self.app.world().get_resource::<WindowWrapper>().unwrap();
window_wrapper.0.request_redraw();
}
fn about_to_wait(&mut self, _event_loop: &ActiveEventLoop) {}
}