LibGL+3DFileViewer: Make glRotatef accept degrees, not radians

This is in accordance with the GL spec. Also adjust rotation values in
3DFileViewer to take the new units into account.
This commit is contained in:
Stephan Unverwerth 2021-08-16 14:01:48 +02:00 committed by Andreas Kling
commit b6373c2aba
Notes: sideshowbarker 2024-07-18 05:31:01 +09:00
2 changed files with 7 additions and 7 deletions

View file

@ -504,7 +504,7 @@ void SoftwareGLContext::gl_rotate(GLdouble angle, GLdouble x, GLdouble y, GLdoub
FloatVector3 axis = { (float)x, (float)y, (float)z };
axis.normalize();
auto rotation_mat = Gfx::rotation_matrix(axis, static_cast<float>(angle));
auto rotation_mat = Gfx::rotation_matrix(axis, static_cast<float>(angle * M_PI * 2 / 360));
if (m_current_matrix_mode == GL_MODELVIEW)
m_model_view_matrix = m_model_view_matrix * rotation_mat;