From ba5df84895db8157bcf4e0d12e3c06f41ee527e9 Mon Sep 17 00:00:00 2001 From: Fabian Klemp Date: Mon, 17 Nov 2014 15:19:36 +0100 Subject: [PATCH] Added light in the middle of the marble. --- level.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/level.cc b/level.cc index 4e1c46a..ec5dc01 100644 --- a/level.cc +++ b/level.cc @@ -26,7 +26,7 @@ void Level::load(ACGL::OpenGL::SharedShaderProgram shader) { Material material = Material("marbleTexture.png", 0.1f, 0.5f, 0.5f, 3.0f); //Create object Object object = Object(model, material, glm::vec3(0.0f, 5.0f, 0.0f), - glm::vec3(0.0f, 1.0472f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), + glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), shader); //add player to phy this->physics.addPlayer(0.75f,0.0f,5.0f,0.0f,1.0f,0); @@ -50,6 +50,8 @@ void Level::load(ACGL::OpenGL::SharedShaderProgram shader) { lights.push_back(light); Light light2 = Light(glm::vec3(3.0f, 6.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(1.0f, 1.0f, 1.0f), 10.0f); lights.push_back(light2); + Light light3 = Light(glm::vec3(0.0f, 5.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.5f, 0.5f, 1.0f), 4.0f); + lights.push_back(light3); // load terrain @@ -92,8 +94,7 @@ void Level::update(float runTime, glm::vec2 mouseDelta, bool wPressed, bool aPre physics.takeUpdateStep(runTime); objects[0].setPosition(physics.getPos(0)); - - + lights[2].setPosition(physics.getPos(0)); } glm::vec3 Level::getAmbientLight() {