1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibGL: Implement matrix mode GL_TEXTURE

Implement support for the `GL_TEXTURE` matrix mode, the texture matrix
stack and texture coordinate matrix transformation.

Also, an unused `m_current_matrix` was removed to make room for
`m_texture_matrix`.
This commit is contained in:
Jelle Raaijmakers 2021-12-21 00:52:14 +01:00 committed by Brian Gianforcaro
parent 4703e8cbcf
commit 18399d00fa
3 changed files with 73 additions and 37 deletions

View file

@ -161,10 +161,12 @@ private:
GLenum m_current_matrix_mode;
FloatMatrix4x4 m_projection_matrix = FloatMatrix4x4::identity();
FloatMatrix4x4 m_model_view_matrix = FloatMatrix4x4::identity();
FloatMatrix4x4 m_current_matrix = FloatMatrix4x4::identity();
FloatMatrix4x4 m_texture_matrix = FloatMatrix4x4::identity();
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;
FloatVector4 m_clear_color { 0.0f, 0.0f, 0.0f, 0.0f };
double m_clear_depth { 1.0 };