Skip to content

Commit

Permalink
LibGL: Set correct matrices in glFrustum and glOrtho
Browse files Browse the repository at this point in the history
We were erroneously setting the projection matrix when `GL_MODELVIEW`
was supplied.
  • Loading branch information
gmta authored and linusg committed Feb 22, 2022
1 parent 5cf967e commit d905de6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Userland/Libraries/LibGL/SoftwareGLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ void SoftwareGLContext::gl_frustum(GLdouble left, GLdouble right, GLdouble botto
if (m_current_matrix_mode == GL_PROJECTION)
m_projection_matrix = m_projection_matrix * frustum;
else if (m_current_matrix_mode == GL_MODELVIEW)
m_projection_matrix = m_model_view_matrix * frustum;
m_model_view_matrix = m_model_view_matrix * frustum;
else if (m_current_matrix_mode == GL_TEXTURE)
m_texture_matrix = m_texture_matrix * frustum;
else
Expand Down Expand Up @@ -432,7 +432,7 @@ void SoftwareGLContext::gl_ortho(GLdouble left, GLdouble right, GLdouble bottom,
if (m_current_matrix_mode == GL_PROJECTION)
m_projection_matrix = m_projection_matrix * projection;
else if (m_current_matrix_mode == GL_MODELVIEW)
m_projection_matrix = m_model_view_matrix * projection;
m_model_view_matrix = m_model_view_matrix * projection;
else if (m_current_matrix_mode == GL_TEXTURE)
m_texture_matrix = m_texture_matrix * projection;
else
Expand Down

0 comments on commit d905de6

Please sign in to comment.