From ed44f71b8cb1184b9da5724c50dadf4861ab2c78 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 23 Nov 2014 00:57:16 +0100 Subject: [PATCH] Replacing skybox attribute with skydome. --- level.cc | 3 ++- level.hh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/level.cc b/level.cc index be1ecac..cf273cc 100644 --- a/level.cc +++ b/level.cc @@ -35,6 +35,7 @@ void Level::load(ACGL::OpenGL::SharedShaderProgram shader) { Object skydomeObject = Object(skydomeModel, skydomeMaterial, glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), shader); objects.push_back(skydomeObject); + skydome = skydomeObject; Model torchModel = Model("torch.obj", 0.75f); Material torchMaterial = Material("torchTexture.png", 0.1f, 0.3f, 0.7f, 10.0f); @@ -124,7 +125,7 @@ void Level::update(float runTime, glm::vec2 mouseDelta, bool wPressed, bool aPre objects[0].setPosition(physics.getPos(0)); objects[0].setRotation(physics.getRotation(0)); - skybox->setPosition(glm::vec3(cameraCenter->getPosition().x, + skydome->setPosition(glm::vec3(cameraCenter->getPosition().x, 0.0f, cameraCenter->getPosition().z)); } diff --git a/level.hh b/level.hh index b0602b2..6aff398 100644 --- a/level.hh +++ b/level.hh @@ -34,7 +34,7 @@ class Level { glm::vec4 fogColor; Light directionalLight; Object* cameraCenter; - Object* skybox; + Object* skydome; Physics physics; Camera camera; Terrain terrain;