First vulkan init working
This commit is contained in:
parent
6639f0bb1e
commit
99be029ff8
4 changed files with 36 additions and 28 deletions
|
@ -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) {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue