diff --git a/src/2.lighting/1.colors/1.lamp.fs b/src/2.lighting/1.colors/1.light_cube.fs similarity index 100% rename from src/2.lighting/1.colors/1.lamp.fs rename to src/2.lighting/1.colors/1.light_cube.fs diff --git a/src/2.lighting/1.colors/1.lamp.vs b/src/2.lighting/1.colors/1.light_cube.vs similarity index 100% rename from src/2.lighting/1.colors/1.lamp.vs rename to src/2.lighting/1.colors/1.light_cube.vs diff --git a/src/2.lighting/1.colors/colors.cpp b/src/2.lighting/1.colors/colors.cpp index f340d0a..92f3fa9 100644 --- a/src/2.lighting/1.colors/colors.cpp +++ b/src/2.lighting/1.colors/colors.cpp @@ -78,7 +78,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("1.colors.vs", "1.colors.fs"); - Shader lampShader("1.lamp.vs", "1.lamp.fs"); + Shader lightCubeShader("1.light_cube.vs", "1.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -140,9 +140,9 @@ int main() glEnableVertexAttribArray(0); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); // we only need to bind to the VBO (to link it with glVertexAttribPointer), no need to fill it; the VBO's data already contains all we need (it's already bound, but we do it again for educational purposes) glBindBuffer(GL_ARRAY_BUFFER, VBO); @@ -191,15 +191,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -212,7 +212,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/2.1.basic_lighting_diffuse/2.1.lamp.fs b/src/2.lighting/2.1.basic_lighting_diffuse/2.1.light_cube.fs similarity index 100% rename from src/2.lighting/2.1.basic_lighting_diffuse/2.1.lamp.fs rename to src/2.lighting/2.1.basic_lighting_diffuse/2.1.light_cube.fs diff --git a/src/2.lighting/2.1.basic_lighting_diffuse/2.1.lamp.vs b/src/2.lighting/2.1.basic_lighting_diffuse/2.1.light_cube.vs similarity index 100% rename from src/2.lighting/2.1.basic_lighting_diffuse/2.1.lamp.vs rename to src/2.lighting/2.1.basic_lighting_diffuse/2.1.light_cube.vs diff --git a/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp b/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp index c6dc23d..ec844cf 100644 --- a/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp +++ b/src/2.lighting/2.1.basic_lighting_diffuse/basic_lighting_diffuse.cpp @@ -78,7 +78,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("2.1.basic_lighting.vs", "2.1.basic_lighting.fs"); - Shader lampShader("2.1.lamp.vs", "2.1.lamp.fs"); + Shader lightCubeShader("2.1.light_cube.vs", "2.1.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -144,9 +144,9 @@ int main() // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -195,15 +195,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -216,7 +216,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/2.2.basic_lighting_specular/2.2.lamp.fs b/src/2.lighting/2.2.basic_lighting_specular/2.2.light_cube.fs similarity index 100% rename from src/2.lighting/2.2.basic_lighting_specular/2.2.lamp.fs rename to src/2.lighting/2.2.basic_lighting_specular/2.2.light_cube.fs diff --git a/src/2.lighting/2.2.basic_lighting_specular/2.2.lamp.vs b/src/2.lighting/2.2.basic_lighting_specular/2.2.light_cube.vs similarity index 100% rename from src/2.lighting/2.2.basic_lighting_specular/2.2.lamp.vs rename to src/2.lighting/2.2.basic_lighting_specular/2.2.light_cube.vs diff --git a/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp b/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp index b38b855..fa85a4e 100644 --- a/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp +++ b/src/2.lighting/2.2.basic_lighting_specular/basic_lighting_specular.cpp @@ -78,7 +78,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("2.2.basic_lighting.vs", "2.2.basic_lighting.fs"); - Shader lampShader("2.2.lamp.vs", "2.2.lamp.fs"); + Shader lightCubeShader("2.2.light_cube.vs", "2.2.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -144,9 +144,9 @@ int main() // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -196,15 +196,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -217,7 +217,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/3.1.materials/3.1.lamp.fs b/src/2.lighting/3.1.materials/3.1.light_cube.fs similarity index 100% rename from src/2.lighting/3.1.materials/3.1.lamp.fs rename to src/2.lighting/3.1.materials/3.1.light_cube.fs diff --git a/src/2.lighting/3.1.materials/3.1.lamp.vs b/src/2.lighting/3.1.materials/3.1.light_cube.vs similarity index 100% rename from src/2.lighting/3.1.materials/3.1.lamp.vs rename to src/2.lighting/3.1.materials/3.1.light_cube.vs diff --git a/src/2.lighting/3.1.materials/materials.cpp b/src/2.lighting/3.1.materials/materials.cpp index d0ddc5f..5ec0f53 100644 --- a/src/2.lighting/3.1.materials/materials.cpp +++ b/src/2.lighting/3.1.materials/materials.cpp @@ -78,7 +78,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("3.1.materials.vs", "3.1.materials.fs"); - Shader lampShader("3.1.lamp.vs", "3.1.lamp.fs"); + Shader lightCubeShader("3.1.light_cube.vs", "3.1.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -144,9 +144,9 @@ int main() // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -211,15 +211,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -232,7 +232,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/3.2.materials_exercise1/3.2.lamp.fs b/src/2.lighting/3.2.materials_exercise1/3.2.light_cube.fs similarity index 100% rename from src/2.lighting/3.2.materials_exercise1/3.2.lamp.fs rename to src/2.lighting/3.2.materials_exercise1/3.2.light_cube.fs diff --git a/src/2.lighting/3.2.materials_exercise1/3.2.lamp.vs b/src/2.lighting/3.2.materials_exercise1/3.2.light_cube.vs similarity index 100% rename from src/2.lighting/3.2.materials_exercise1/3.2.lamp.vs rename to src/2.lighting/3.2.materials_exercise1/3.2.light_cube.vs diff --git a/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp b/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp index e18e094..c5601f0 100644 --- a/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp +++ b/src/2.lighting/3.2.materials_exercise1/materials_exercise1.cpp @@ -78,7 +78,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("3.2.materials.vs", "3.2.materials.fs"); - Shader lampShader("3.2.lamp.vs", "3.2.lamp.fs"); + Shader lightCubeShader("3.2.light_cube.vs", "3.2.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -144,9 +144,9 @@ int main() // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -205,15 +205,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -226,7 +226,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.lamp.fs b/src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.light_cube.fs similarity index 100% rename from src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.lamp.fs rename to src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.light_cube.fs diff --git a/src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.lamp.vs b/src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.light_cube.vs similarity index 100% rename from src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.lamp.vs rename to src/2.lighting/4.1.lighting_maps_diffuse_map/4.1.light_cube.vs diff --git a/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp b/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp index ebd487c..dc73bb7 100644 --- a/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp +++ b/src/2.lighting/4.1.lighting_maps_diffuse_map/lighting_maps_diffuse.cpp @@ -80,7 +80,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("4.1.lighting_maps.vs", "4.1.lighting_maps.fs"); - Shader lampShader("4.1.lamp.vs", "4.1.lamp.fs"); + Shader lightCubeShader("4.1.light_cube.vs", "4.1.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -145,9 +145,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -217,15 +217,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -238,7 +238,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/4.2.lighting_maps_specular_map/4.2.lamp.fs b/src/2.lighting/4.2.lighting_maps_specular_map/4.2.light_cube.fs similarity index 100% rename from src/2.lighting/4.2.lighting_maps_specular_map/4.2.lamp.fs rename to src/2.lighting/4.2.lighting_maps_specular_map/4.2.light_cube.fs diff --git a/src/2.lighting/4.2.lighting_maps_specular_map/4.2.lamp.vs b/src/2.lighting/4.2.lighting_maps_specular_map/4.2.light_cube.vs similarity index 100% rename from src/2.lighting/4.2.lighting_maps_specular_map/4.2.lamp.vs rename to src/2.lighting/4.2.lighting_maps_specular_map/4.2.light_cube.vs diff --git a/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp b/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp index 681446b..c529e7c 100644 --- a/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp +++ b/src/2.lighting/4.2.lighting_maps_specular_map/lighting_maps_specular.cpp @@ -80,7 +80,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("4.2.lighting_maps.vs", "4.2.lighting_maps.fs"); - Shader lampShader("4.2.lamp.vs", "4.2.lamp.fs"); + Shader lightCubeShader("4.2.light_cube.vs", "4.2.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -145,9 +145,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -221,15 +221,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -242,7 +242,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/4.4.lighting_maps_exercise4/4.4.lamp.fs b/src/2.lighting/4.4.lighting_maps_exercise4/4.4.light_cube.fs similarity index 100% rename from src/2.lighting/4.4.lighting_maps_exercise4/4.4.lamp.fs rename to src/2.lighting/4.4.lighting_maps_exercise4/4.4.light_cube.fs diff --git a/src/2.lighting/4.4.lighting_maps_exercise4/4.4.lamp.vs b/src/2.lighting/4.4.lighting_maps_exercise4/4.4.light_cube.vs similarity index 100% rename from src/2.lighting/4.4.lighting_maps_exercise4/4.4.lamp.vs rename to src/2.lighting/4.4.lighting_maps_exercise4/4.4.light_cube.vs diff --git a/src/2.lighting/4.4.lighting_maps_exercise4/lighting_maps_exercise4.cpp b/src/2.lighting/4.4.lighting_maps_exercise4/lighting_maps_exercise4.cpp index 1d7d268..998f853 100644 --- a/src/2.lighting/4.4.lighting_maps_exercise4/lighting_maps_exercise4.cpp +++ b/src/2.lighting/4.4.lighting_maps_exercise4/lighting_maps_exercise4.cpp @@ -80,7 +80,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("4.4.lighting_maps.vs", "4.4.lighting_maps.fs"); - Shader lampShader("4.4.lamp.vs", "4.4.lamp.fs"); + Shader lightCubeShader("4.4.light_cube.vs", "4.4.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -145,9 +145,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -226,15 +226,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -247,7 +247,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/5.1.light_casters_directional/5.1.lamp.fs b/src/2.lighting/5.1.light_casters_directional/5.1.light_cube.fs similarity index 100% rename from src/2.lighting/5.1.light_casters_directional/5.1.lamp.fs rename to src/2.lighting/5.1.light_casters_directional/5.1.light_cube.fs diff --git a/src/2.lighting/5.1.light_casters_directional/5.1.lamp.vs b/src/2.lighting/5.1.light_casters_directional/5.1.light_cube.vs similarity index 100% rename from src/2.lighting/5.1.light_casters_directional/5.1.lamp.vs rename to src/2.lighting/5.1.light_casters_directional/5.1.light_cube.vs diff --git a/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp b/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp index 9c4e120..8609582 100644 --- a/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp +++ b/src/2.lighting/5.1.light_casters_directional/light_casters_directional.cpp @@ -77,7 +77,7 @@ int main() // build and compile shaders // ------------------------- Shader lightingShader("5.1.light_casters.vs", "5.1.light_casters.fs"); - Shader lampShader("5.1.lamp.vs", "5.1.lamp.fs"); + Shader lightCubeShader("5.1.light_cube.vs", "5.1.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -155,9 +155,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -245,15 +245,15 @@ int main() // a lamp object is weird when we only have a directional light, don't render the light object - // lampShader.use(); - // lampShader.setMat4("projection", projection); - // lampShader.setMat4("view", view); + // lightCubeShader.use(); + // lightCubeShader.setMat4("projection", projection); + // lightCubeShader.setMat4("view", view); // model = glm::mat4(1.0f); // model = glm::translate(model, lightPos); // model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - // lampShader.setMat4("model", model); + // lightCubeShader.setMat4("model", model); - // glBindVertexArray(lightVAO); + // glBindVertexArray(lightCubeVAO); // glDrawArrays(GL_TRIANGLES, 0, 36); @@ -266,7 +266,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/5.2.light_casters_point/5.2.lamp.fs b/src/2.lighting/5.2.light_casters_point/5.2.light_cube.fs similarity index 100% rename from src/2.lighting/5.2.light_casters_point/5.2.lamp.fs rename to src/2.lighting/5.2.light_casters_point/5.2.light_cube.fs diff --git a/src/2.lighting/5.2.light_casters_point/5.2.lamp.vs b/src/2.lighting/5.2.light_casters_point/5.2.light_cube.vs similarity index 100% rename from src/2.lighting/5.2.light_casters_point/5.2.lamp.vs rename to src/2.lighting/5.2.light_casters_point/5.2.light_cube.vs diff --git a/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp b/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp index 7b71210..680a76e 100644 --- a/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp +++ b/src/2.lighting/5.2.light_casters_point/light_casters_point.cpp @@ -80,7 +80,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("5.2.light_casters.vs", "5.2.light_casters.fs"); - Shader lampShader("5.2.lamp.vs", "5.2.lamp.fs"); + Shader lightCubeShader("5.2.light_cube.vs", "5.2.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -158,9 +158,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -247,15 +247,15 @@ int main() // also draw the lamp object - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); model = glm::mat4(1.0f); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); glDrawArrays(GL_TRIANGLES, 0, 36); @@ -268,7 +268,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/5.3.light_casters_spot/5.3.lamp.fs b/src/2.lighting/5.3.light_casters_spot/5.3.light_cube.fs similarity index 100% rename from src/2.lighting/5.3.light_casters_spot/5.3.lamp.fs rename to src/2.lighting/5.3.light_casters_spot/5.3.light_cube.fs diff --git a/src/2.lighting/5.3.light_casters_spot/5.3.lamp.vs b/src/2.lighting/5.3.light_casters_spot/5.3.light_cube.vs similarity index 100% rename from src/2.lighting/5.3.light_casters_spot/5.3.lamp.vs rename to src/2.lighting/5.3.light_casters_spot/5.3.light_cube.vs diff --git a/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp b/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp index 9b484ed..cbfce0c 100644 --- a/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp +++ b/src/2.lighting/5.3.light_casters_spot/light_casters_spot.cpp @@ -77,7 +77,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("5.3.light_casters.vs", "5.3.light_casters.fs"); - Shader lampShader("5.3.lamp.vs", "5.3.lamp.fs"); + Shader lightCubeShader("5.3.light_cube.vs", "5.3.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -155,9 +155,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -248,15 +248,15 @@ int main() // again, a lamp object is weird when we only have a spot light, don't render the light object - // lampShader.use(); - // lampShader.setMat4("projection", projection); - // lampShader.setMat4("view", view); + // lightCubeShader.use(); + // lightCubeShader.setMat4("projection", projection); + // lightCubeShader.setMat4("view", view); // model = glm::mat4(1.0f); // model = glm::translate(model, lightPos); // model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - // lampShader.setMat4("model", model); + // lightCubeShader.setMat4("model", model); - // glBindVertexArray(lightVAO); + // glBindVertexArray(lightCubeVAO); // glDrawArrays(GL_TRIANGLES, 0, 36); @@ -269,7 +269,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/5.4.light_casters_spot_soft/5.4.lamp.fs b/src/2.lighting/5.4.light_casters_spot_soft/5.4.light_cube.fs similarity index 100% rename from src/2.lighting/5.4.light_casters_spot_soft/5.4.lamp.fs rename to src/2.lighting/5.4.light_casters_spot_soft/5.4.light_cube.fs diff --git a/src/2.lighting/5.4.light_casters_spot_soft/5.4.lamp.vs b/src/2.lighting/5.4.light_casters_spot_soft/5.4.light_cube.vs similarity index 100% rename from src/2.lighting/5.4.light_casters_spot_soft/5.4.lamp.vs rename to src/2.lighting/5.4.light_casters_spot_soft/5.4.light_cube.vs diff --git a/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp b/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp index 974c204..0b53102 100644 --- a/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp +++ b/src/2.lighting/5.4.light_casters_spot_soft/light_casters_spot_soft.cpp @@ -77,7 +77,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("5.4.light_casters.vs", "5.4.light_casters.fs"); - Shader lampShader("5.4.lamp.vs", "5.4.lamp.fs"); + Shader lightCubeShader("5.4.light_cube.vs", "5.4.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -155,9 +155,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -248,15 +248,15 @@ int main() } // again, a lamp object is weird when we only have a spot light, don't render the light object - // lampShader.use(); - // lampShader.setMat4("projection", projection); - // lampShader.setMat4("view", view); + // lightCubeShader.use(); + // lightCubeShader.setMat4("projection", projection); + // lightCubeShader.setMat4("view", view); // model = glm::mat4(1.0f); // model = glm::translate(model, lightPos); // model = glm::scale(model, glm::vec3(0.2f)); // a smaller cube - // lampShader.setMat4("model", model); + // lightCubeShader.setMat4("model", model); - // glBindVertexArray(lightVAO); + // glBindVertexArray(lightCubeVAO); // glDrawArrays(GL_TRIANGLES, 0, 36); @@ -269,7 +269,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources. diff --git a/src/2.lighting/6.multiple_lights/6.lamp.fs b/src/2.lighting/6.multiple_lights/6.light_cube.fs similarity index 100% rename from src/2.lighting/6.multiple_lights/6.lamp.fs rename to src/2.lighting/6.multiple_lights/6.light_cube.fs diff --git a/src/2.lighting/6.multiple_lights/6.lamp.vs b/src/2.lighting/6.multiple_lights/6.light_cube.vs similarity index 100% rename from src/2.lighting/6.multiple_lights/6.lamp.vs rename to src/2.lighting/6.multiple_lights/6.light_cube.vs diff --git a/src/2.lighting/6.multiple_lights/multiple_lights.cpp b/src/2.lighting/6.multiple_lights/multiple_lights.cpp index 1882327..77fd3c9 100644 --- a/src/2.lighting/6.multiple_lights/multiple_lights.cpp +++ b/src/2.lighting/6.multiple_lights/multiple_lights.cpp @@ -80,7 +80,7 @@ int main() // build and compile our shader zprogram // ------------------------------------ Shader lightingShader("6.multiple_lights.vs", "6.multiple_lights.fs"); - Shader lampShader("6.lamp.vs", "6.lamp.fs"); + Shader lightCubeShader("6.light_cube.vs", "6.light_cube.fs"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ @@ -165,9 +165,9 @@ int main() glEnableVertexAttribArray(2); // second, configure the light's VAO (VBO stays the same; the vertices are the same for the light object which is also a 3D cube) - unsigned int lightVAO; - glGenVertexArrays(1, &lightVAO); - glBindVertexArray(lightVAO); + unsigned int lightCubeVAO; + glGenVertexArrays(1, &lightCubeVAO); + glBindVertexArray(lightCubeVAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); // note that we update the lamp's position attribute's stride to reflect the updated buffer data @@ -297,18 +297,18 @@ int main() } // also draw the lamp object(s) - lampShader.use(); - lampShader.setMat4("projection", projection); - lampShader.setMat4("view", view); + lightCubeShader.use(); + lightCubeShader.setMat4("projection", projection); + lightCubeShader.setMat4("view", view); // we now draw as many light bulbs as we have point lights. - glBindVertexArray(lightVAO); + glBindVertexArray(lightCubeVAO); for (unsigned int i = 0; i < 4; i++) { model = glm::mat4(1.0f); model = glm::translate(model, pointLightPositions[i]); model = glm::scale(model, glm::vec3(0.2f)); // Make it a smaller cube - lampShader.setMat4("model", model); + lightCubeShader.setMat4("model", model); glDrawArrays(GL_TRIANGLES, 0, 36); } @@ -322,7 +322,7 @@ int main() // optional: de-allocate all resources once they've outlived their purpose: // ------------------------------------------------------------------------ glDeleteVertexArrays(1, &cubeVAO); - glDeleteVertexArrays(1, &lightVAO); + glDeleteVertexArrays(1, &lightCubeVAO); glDeleteBuffers(1, &VBO); // glfw: terminate, clearing all previously allocated GLFW resources.