LibGL: Set correct matrices in glFrustum and glOrtho

We were erroneously setting the projection matrix when `GL_MODELVIEW`
was supplied.
This commit is contained in:
Jelle Raaijmakers 2022-02-21 01:32:40 +01:00 committed by Linus Groh
parent 5cf967e4f2
commit d905de6a7a
Notes: sideshowbarker 2024-07-18 03:35:30 +09:00

View file

@ -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
@ -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