From b6373c2aba39d9d5819cc6edc1c4b5bc20b63176 Mon Sep 17 00:00:00 2001 From: Stephan Unverwerth Date: Mon, 16 Aug 2021 14:01:48 +0200 Subject: 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. --- Userland/Libraries/LibGL/SoftwareGLContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibGL') 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(angle)); + auto rotation_mat = Gfx::rotation_matrix(axis, static_cast(angle * M_PI * 2 / 360)); if (m_current_matrix_mode == GL_MODELVIEW) m_model_view_matrix = m_model_view_matrix * rotation_mat; -- cgit v1.2.3