diff options
author | Stephan Unverwerth <s.unverwerth@serenityos.org> | 2021-08-16 14:01:48 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-18 20:30:58 +0200 |
commit | b6373c2aba39d9d5819cc6edc1c4b5bc20b63176 (patch) | |
tree | a735820c530bf356d098e56348287c4ffbe1ecb5 /Userland/Libraries/LibGL | |
parent | 5a8de62a1ae67fc4f09b17bc33bd821521288758 (diff) | |
download | serenity-b6373c2aba39d9d5819cc6edc1c4b5bc20b63176.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r-- | Userland/Libraries/LibGL/SoftwareGLContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index a3370a1e9a..323955520c 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -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; |