1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibGL: Impement glLoadMatrixf and underlying function

This commit is contained in:
Jesse Buhagiar 2021-04-24 22:43:42 +10:00 committed by Andreas Kling
parent ea0df0b5da
commit f07a7f7b94
5 changed files with 32 additions and 0 deletions

View file

@ -494,6 +494,23 @@ void SoftwareGLContext::gl_load_identity()
m_error = GL_NO_ERROR;
}
void SoftwareGLContext::gl_load_matrix(const FloatMatrix4x4& matrix)
{
if (m_in_draw_state) {
m_error = GL_INVALID_OPERATION;
return;
}
if (m_current_matrix_mode == GL_PROJECTION)
m_projection_matrix = matrix;
else if (m_current_matrix_mode == GL_MODELVIEW)
m_model_view_matrix = matrix;
else
VERIFY_NOT_REACHED();
m_error = GL_NO_ERROR;
}
void SoftwareGLContext::gl_matrix_mode(GLenum mode)
{
if (m_in_draw_state) {