fix narrowing conversions (eg double to float, size_t to GLsizei)

This commit is contained in:
N. Pattakos
2022-01-07 23:13:19 +01:00
parent 47a6664845
commit 72f3e37150
59 changed files with 371 additions and 238 deletions

View File

@@ -168,7 +168,7 @@ int main()
{
// per-frame time logic
// --------------------
float currentFrame = glfwGetTime();
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -257,8 +257,10 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// glfw: whenever the mouse moves, this callback is called
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xpos, double ypos)
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
if (firstMouse)
{
lastX = xpos;