window :3

This commit is contained in:
LunarAkai 2025-08-29 10:25:08 +02:00
commit 4f584b7040
4 changed files with 8 additions and 9 deletions

View file

@ -27,13 +27,13 @@ impl Default for Window {
impl Window {
pub fn init(&mut self) -> Self {
let g_window = Some(moonhare_window::Window::create(self.context));
Self {
context: moonhare_window::WindowRenderContext::OPENGLGLFW,
glfw_window: Some(moonhare_window::Window::create(self.context)),
render_context: match self.glfw_window {
Some(window) => Some(moonhare_graphics::build_context(Box::new(window))),
None => moonhare_log::error("No window"),
},
glfw_window: g_window.clone(),
render_context: Some(moonhare_graphics::build_context(
g_window.clone().unwrap().glfw_window,
)),
//Some(moonhare_graphics::build_context(
// self.glfw_window.clone().unwrap().glfw_window,
//)),