mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:58:11 +00:00
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:
parent
5a8de62a1a
commit
b6373c2aba
2 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue