mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
fixed compiler warnings reported by gcc/clang
* changed some catch blocks to use exception references instead of value types * fixed missing use of SCR_WIDTH/SCR_HEIGHT for glfwCreateWindow * fixed implicit numeric type casts regarding signedness * removed unused variables Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -380,7 +380,6 @@ void processInput(GLFWwindow *window)
|
||||
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
|
||||
glfwSetWindowShouldClose(window, true);
|
||||
|
||||
float cameraSpeed = 2.5 * deltaTime;
|
||||
if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS)
|
||||
camera.ProcessKeyboard(FORWARD, deltaTime);
|
||||
if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS)
|
||||
|
||||
@@ -220,7 +220,6 @@ int main()
|
||||
shaderLightingPass.setVec3("lights[" + std::to_string(i) + "].Position", lightPositions[i]);
|
||||
shaderLightingPass.setVec3("lights[" + std::to_string(i) + "].Color", lightColors[i]);
|
||||
// update attenuation parameters and calculate radius
|
||||
const float constant = 1.0; // note that we don't send this to the shader, we assume it is always 1.0 (in our case)
|
||||
const float linear = 0.7;
|
||||
const float quadratic = 1.8;
|
||||
shaderLightingPass.setFloat("lights[" + std::to_string(i) + "].Linear", linear);
|
||||
|
||||
@@ -302,7 +302,6 @@ int main()
|
||||
shaderLightingPass.setVec3("light.Position", lightPosView);
|
||||
shaderLightingPass.setVec3("light.Color", lightColor);
|
||||
// Update attenuation parameters
|
||||
const float constant = 1.0; // note that we don't send this to the shader, we assume it is always 1.0 (in our case)
|
||||
const float linear = 0.09;
|
||||
const float quadratic = 0.032;
|
||||
shaderLightingPass.setFloat("light.Linear", linear);
|
||||
|
||||
Reference in New Issue
Block a user