summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GLContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGL/GLContext.h')
-rw-r--r--Userland/Libraries/LibGL/GLContext.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGL/GLContext.h b/Userland/Libraries/LibGL/GLContext.h
index ec6e80378b..943d0c4b80 100644
--- a/Userland/Libraries/LibGL/GLContext.h
+++ b/Userland/Libraries/LibGL/GLContext.h
@@ -196,15 +196,17 @@ private:
[[nodiscard]] bool should_execute_after_appending_to_listing() const { return m_current_listing_index.has_value() && m_current_listing_index->mode == GL_COMPILE_AND_EXECUTE; }
GLenum m_current_draw_mode;
- GLenum m_current_matrix_mode;
- FloatMatrix4x4 m_projection_matrix = FloatMatrix4x4::identity();
- FloatMatrix4x4 m_model_view_matrix = FloatMatrix4x4::identity();
- FloatMatrix4x4 m_texture_matrix = FloatMatrix4x4::identity();
+ GLenum m_current_matrix_mode { GL_MODELVIEW };
+ FloatMatrix4x4 m_projection_matrix { FloatMatrix4x4::identity() };
+ FloatMatrix4x4 m_model_view_matrix { FloatMatrix4x4::identity() };
+ FloatMatrix4x4 m_texture_matrix { FloatMatrix4x4::identity() };
+ FloatMatrix4x4* m_current_matrix { &m_model_view_matrix };
Vector<FloatMatrix4x4> m_projection_matrix_stack;
Vector<FloatMatrix4x4> m_model_view_matrix_stack;
// FIXME: implement multi-texturing: the texture matrix stack should live inside a texture unit
Vector<FloatMatrix4x4> m_texture_matrix_stack;
+ Vector<FloatMatrix4x4>* m_current_matrix_stack { &m_model_view_matrix_stack };
Gfx::IntRect m_viewport;