update merge request as requested by JoeyDeVries: no auto or GLtypes

This commit is contained in:
N. Pattakos
2022-01-10 00:45:44 +01:00
parent 1be7d8ab3e
commit 93be6f82ab
59 changed files with 260 additions and 260 deletions

View File

@@ -177,7 +177,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -261,8 +261,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
@@ -284,7 +284,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -177,7 +177,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -261,8 +261,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
@@ -284,7 +284,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -105,11 +105,11 @@ int main()
model = glm::translate(model, glm::vec3(x, y, z));
// 2. scale: Scale between 0.05 and 0.25f
float scale = static_cast<GLfloat>((rand() % 20) / 100.0 + 0.05);
float scale = static_cast<float>((rand() % 20) / 100.0 + 0.05);
model = glm::scale(model, glm::vec3(scale));
// 3. rotation: add random rotation around a (semi)randomly picked rotation axis vector
float rotAngle = static_cast<GLfloat>((rand() % 360));
float rotAngle = static_cast<float>((rand() % 360));
model = glm::rotate(model, rotAngle, glm::vec3(0.4f, 0.6f, 0.8f));
// 4. now add to list of matrices
@@ -122,7 +122,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -196,8 +196,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
@@ -219,5 +219,5 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}

View File

@@ -106,11 +106,11 @@ int main()
model = glm::translate(model, glm::vec3(x, y, z));
// 2. scale: Scale between 0.05 and 0.25f
auto scale = static_cast<GLfloat>((rand() % 20) / 100.0 + 0.05);
float scale = static_cast<float>((rand() % 20) / 100.0 + 0.05);
model = glm::scale(model, glm::vec3(scale));
// 3. rotation: add random rotation around a (semi)randomly picked rotation axis vector
auto rotAngle = static_cast<GLfloat>((rand() % 360));
float rotAngle = static_cast<float>((rand() % 360));
model = glm::rotate(model, rotAngle, glm::vec3(0.4f, 0.6f, 0.8f));
// 4. now add to list of matrices
@@ -156,7 +156,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -194,7 +194,7 @@ int main()
for (unsigned int i = 0; i < rock.meshes.size(); i++)
{
glBindVertexArray(rock.meshes[i].VAO);
glDrawElementsInstanced(GL_TRIANGLES, static_cast<GLsizei>(rock.meshes[i].indices.size()), GL_UNSIGNED_INT, 0, amount);
glDrawElementsInstanced(GL_TRIANGLES, static_cast<unsigned int>(rock.meshes[i].indices.size()), GL_UNSIGNED_INT, 0, amount);
glBindVertexArray(0);
}
@@ -238,8 +238,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
@@ -261,5 +261,5 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}

View File

@@ -141,7 +141,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -204,8 +204,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -226,5 +226,5 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}

View File

@@ -209,7 +209,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -296,8 +296,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -318,5 +318,5 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}

View File

@@ -181,7 +181,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -305,8 +305,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
@@ -328,7 +328,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -208,7 +208,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -304,8 +304,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -326,7 +326,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -210,7 +210,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -315,8 +315,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -337,7 +337,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -226,7 +226,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -331,8 +331,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -353,7 +353,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -226,7 +226,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -363,8 +363,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -385,7 +385,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -222,7 +222,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -311,8 +311,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -333,7 +333,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -220,7 +220,7 @@ int main()
{
// per-frame time logic
// --------------------
float currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -310,8 +310,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -332,7 +332,7 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}
// utility function for loading a 2D texture from file

View File

@@ -168,7 +168,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -259,8 +259,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;

View File

@@ -88,7 +88,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -111,7 +111,7 @@ int main()
shader.setMat4("model", model);
// add time component to geometry shader in the form of a uniform
shader.setFloat("time", static_cast<GLfloat>(glfwGetTime()));
shader.setFloat("time", static_cast<float>(glfwGetTime()));
// draw model
nanosuit.Draw(shader);
@@ -156,8 +156,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -178,5 +178,5 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}

View File

@@ -90,7 +90,7 @@ int main()
{
// per-frame time logic
// --------------------
auto currentFrame = static_cast<GLfloat>(glfwGetTime());
float currentFrame = static_cast<float>(glfwGetTime());
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
@@ -163,8 +163,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
{
auto xpos = static_cast<GLfloat>(xposIn);
auto ypos = static_cast<GLfloat>(yposIn);
float xpos = static_cast<float>(xposIn);
float ypos = static_cast<float>(yposIn);
if (firstMouse)
{
lastX = xpos;
@@ -185,5 +185,5 @@ void mouse_callback(GLFWwindow* window, double xposIn, double yposIn)
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(static_cast<GLfloat>(yoffset));
camera.ProcessMouseScroll(static_cast<float>(yoffset));
}