From cbf93ee687d3e2f5d75823387b15b90a1d7911e7 Mon Sep 17 00:00:00 2001 From: Stephan Unverwerth Date: Sun, 28 Nov 2021 17:20:56 +0100 Subject: [PATCH] LibGL: Initialize all GL context matrices with the identity matrix --- Userland/Libraries/LibGL/SoftwareGLContext.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.h b/Userland/Libraries/LibGL/SoftwareGLContext.h index 16c13ef0b1..e42d80c3dd 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.h +++ b/Userland/Libraries/LibGL/SoftwareGLContext.h @@ -122,10 +122,9 @@ private: GLenum m_current_draw_mode; GLenum m_current_matrix_mode; - FloatMatrix4x4 m_projection_matrix; - FloatMatrix4x4 m_model_view_matrix; - - FloatMatrix4x4 m_current_matrix; + FloatMatrix4x4 m_projection_matrix = FloatMatrix4x4::identity(); + FloatMatrix4x4 m_model_view_matrix = FloatMatrix4x4::identity(); + FloatMatrix4x4 m_current_matrix = FloatMatrix4x4::identity(); Vector m_projection_matrix_stack; Vector m_model_view_matrix_stack;