summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@serenityos.org>2021-11-28 17:20:56 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-11-28 10:07:34 -0800
commitcbf93ee687d3e2f5d75823387b15b90a1d7911e7 (patch)
treec174c4895a9caa38c244f2c3e5378b9b0668f661
parent36bd230ffa246ef45260e6f8b28379380f4e2da9 (diff)
downloadserenity-cbf93ee687d3e2f5d75823387b15b90a1d7911e7.zip
LibGL: Initialize all GL context matrices with the identity matrix
-rw-r--r--Userland/Libraries/LibGL/SoftwareGLContext.h7
1 files 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<FloatMatrix4x4> m_projection_matrix_stack;
Vector<FloatMatrix4x4> m_model_view_matrix_stack;