app: refactor WindowContext name and creation

This commit is contained in:
Florian RICHER 2025-05-31 12:56:00 +02:00
parent a293b962f7
commit 45ccf030f6
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
6 changed files with 42 additions and 52 deletions

View file

@ -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>>,