Avoid -Wdouble-promotion warnings

This commit is contained in:
Paul Cornett
2020-10-14 11:07:55 -07:00
parent 97655e5b21
commit b5a554b9a6
44 changed files with 208 additions and 201 deletions

View File

@@ -247,10 +247,10 @@ void TestGLCanvas::OnMouse(wxMouseEvent& event)
/* drag in progress, simulate trackball */
float spin_quat[4];
trackball(spin_quat,
(2.0*m_gldata.beginx - sz.x) / sz.x,
(sz.y - 2.0*m_gldata.beginy) / sz.y,
(2.0*event.GetX() - sz.x) / sz.x,
(sz.y - 2.0*event.GetY()) / sz.y);
(2 * m_gldata.beginx - sz.x) / sz.x,
(sz.y - 2 * m_gldata.beginy) / sz.y,
(2 * event.GetX() - sz.x) / sz.x,
(sz.y - 2 * event.GetY()) / sz.y);
add_quats(spin_quat, m_gldata.quat, m_gldata.quat);
@@ -315,7 +315,7 @@ void TestGLCanvas::ResetProjectionMode()
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f, (GLfloat)ClientSize.x/ClientSize.y, 1.0, 100.0);
gluPerspective(45, double(ClientSize.x) / ClientSize.y, 1, 100);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}