app: refactor WindowContext name and creation
This commit is contained in:
parent
a293b962f7
commit
45ccf030f6
6 changed files with 42 additions and 52 deletions
|
@ -13,11 +13,7 @@ use vulkano::{
|
|||
memory::allocator::StandardMemoryAllocator,
|
||||
};
|
||||
use vulkano_util::{renderer::VulkanoWindowRenderer, window::VulkanoWindows};
|
||||
use winit::{
|
||||
event_loop::EventLoopProxy,
|
||||
monitor::MonitorHandle,
|
||||
window::{Window, WindowId},
|
||||
};
|
||||
use winit::{event_loop::EventLoopProxy, monitor::MonitorHandle, window::WindowId};
|
||||
|
||||
use crate::core::{input::InputManager, render::vulkan_context::VulkanContext, timer::Timer};
|
||||
|
||||
|
@ -25,7 +21,7 @@ use super::user_event::UserEvent;
|
|||
|
||||
/// Contexte d'application unifié avec Arc<Mutex<>> pour la mutabilité partagée
|
||||
#[derive(Clone)]
|
||||
pub struct ApplicationContext {
|
||||
pub struct WindowContext {
|
||||
// Données Vulkan (immutables)
|
||||
pub vulkan_context: Arc<VulkanContext>,
|
||||
pub device: Arc<Device>,
|
||||
|
@ -46,7 +42,7 @@ pub struct ApplicationContext {
|
|||
pub gui: Rc<RefCell<Gui>>,
|
||||
}
|
||||
|
||||
impl ApplicationContext {
|
||||
impl WindowContext {
|
||||
pub fn new(
|
||||
vulkan_context: Arc<VulkanContext>,
|
||||
vulkano_windows: Rc<RefCell<VulkanoWindows>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue