summaryrefslogtreecommitdiff
path: root/engine/src/rendering
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/rendering')
-rw-r--r--engine/src/rendering/backend/opengl.rs37
-rw-r--r--engine/src/rendering/shader.rs5
2 files changed, 16 insertions, 26 deletions
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<TargetWindow>,
- Without<CreationReady>,
- Without<WindowGlConfig>,
- Without<WindowClosed>,
- ),
- >,
+ window_query: Query<(
+ Option<&Window>,
+ &mut WindowCreationAttributes,
+ With<TargetWindow>,
+ Without<CreationReady>,
+ Without<WindowGlConfig>,
+ Without<WindowClosed>,
+ )>,
windowing_context: Single<WindowingContext>,
graphics_props: Single<GraphicsProperties>,
mut actions: Actions,
@@ -272,9 +269,12 @@ fn prepare_windows(
#[tracing::instrument(skip_all)]
fn init_window_graphics(
- window_query: Query<
- (&Window, &WindowGlConfig, With<TargetWindow>, Without<SurfaceSpec>),
- >,
+ window_query: Query<(
+ &Window,
+ &WindowGlConfig,
+ With<TargetWindow>,
+ Without<SurfaceSpec>,
+ )>,
windowing_context: Single<WindowingContext>,
graphics_props: Single<GraphicsProperties>,
mut graphics_ctx: Single<GraphicsContext>,
@@ -1485,15 +1485,6 @@ impl<Value: ReprC + IntoBytes + Copy> From<Vec3<Value>>
}
}
-impl<Value: ReprC + Copy> From<Matrix<Value, 4, 4>>
- for opengl_bindings::data_types::Matrix<Value, 4, 4>
-{
- fn from(matrix: Matrix<Value, 4, 4>) -> Self
- {
- Self { items: matrix.items }
- }
-}
-
impl<Value: Copy> From<Dimens<Value>> for opengl_bindings::data_types::Dimens<Value>
{
fn from(dimens: Dimens<Value>) -> Self
diff --git a/engine/src/rendering/shader.rs b/engine/src/rendering/shader.rs
index 7d5bd51..b508670 100644
--- a/engine/src/rendering/shader.rs
+++ b/engine/src/rendering/shader.rs
@@ -28,12 +28,11 @@ use crate::asset::{
Submitter as AssetSubmitter,
HANDLE_ASSETS_PHASE,
};
-use crate::ecs::pair;
use crate::builder;
use crate::ecs::pair::ChildOf;
use crate::ecs::phase::{Phase, POST_UPDATE as POST_UPDATE_PHASE};
use crate::ecs::sole::Single;
-use crate::ecs::{declare_entity, Component, Sole};
+use crate::ecs::{declare_entity, pair, Component, Sole};
pub mod cursor;
pub mod default;
@@ -1018,7 +1017,7 @@ pub(super) fn prepare(collector: &mut crate::ecs::extension::Collector<'_>)
let session_options = shader_slang::CompilerOptions::default()
.optimization(shader_slang::OptimizationLevel::None)
- .matrix_layout_column(true)
+ .matrix_layout_row(true)
.debug_information(SlangDebugInfoLevel::Maximal)
.no_mangle(true);