From 7b0edcfc6a07ff4d64e602f2b68d93fedc8b826d Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 2 Aug 2026 16:11:30 +0200 Subject: fix(engine): improve portability by making matrices row-major --- engine/src/rendering/backend/opengl.rs | 37 +++++++++++++--------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'engine/src/rendering/backend/opengl.rs') diff --git a/engine/src/rendering/backend/opengl.rs b/engine/src/rendering/backend/opengl.rs index 1253c7b..f88fe38 100644 --- a/engine/src/rendering/backend/opengl.rs +++ b/engine/src/rendering/backend/opengl.rs @@ -76,7 +76,6 @@ use crate::ecs::query::term::Without; use crate::ecs::sole::Single; use crate::ecs::{Component, Query, Sole}; use crate::image::{ColorType as ImageColorType, Image}; -use crate::matrix::Matrix; use crate::reflection::EnumReflectionExt; use crate::rendering::backend::opengl::glutin_compat::{ DisplayBuilder, @@ -187,16 +186,14 @@ impl crate::ecs::extension::Extension for Extension } fn prepare_windows( - window_query: Query< - ( - Option<&Window>, - &mut WindowCreationAttributes, - With, - Without, - Without, - Without, - ), - >, + window_query: Query<( + Option<&Window>, + &mut WindowCreationAttributes, + With, + Without, + Without, + Without, + )>, windowing_context: Single, graphics_props: Single, mut actions: Actions, @@ -272,9 +269,12 @@ fn prepare_windows( #[tracing::instrument(skip_all)] fn init_window_graphics( - window_query: Query< - (&Window, &WindowGlConfig, With, Without), - >, + window_query: Query<( + &Window, + &WindowGlConfig, + With, + Without, + )>, windowing_context: Single, graphics_props: Single, mut graphics_ctx: Single, @@ -1485,15 +1485,6 @@ impl From> } } -impl From> - for opengl_bindings::data_types::Matrix -{ - fn from(matrix: Matrix) -> Self - { - Self { items: matrix.items } - } -} - impl From> for opengl_bindings::data_types::Dimens { fn from(dimens: Dimens) -> Self -- cgit v1.2.3-18-g5258