Replacing skybox attribute with skydome.
This commit is contained in:
parent
22c9a7a936
commit
4fb383976b
3
level.cc
3
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),
|
Object skydomeObject = Object(skydomeModel, skydomeMaterial, glm::vec3(0.0f, 0.0f, 0.0f),
|
||||||
glm::vec3(0.0f, 0.0f, 0.0f), shader);
|
glm::vec3(0.0f, 0.0f, 0.0f), shader);
|
||||||
objects.push_back(skydomeObject);
|
objects.push_back(skydomeObject);
|
||||||
|
skydome = skydomeObject;
|
||||||
|
|
||||||
Model torchModel = Model("torch.obj", 0.75f);
|
Model torchModel = Model("torch.obj", 0.75f);
|
||||||
Material torchMaterial = Material("torchTexture.png", 0.1f, 0.3f, 0.7f, 10.0f);
|
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].setPosition(physics.getPos(0));
|
||||||
objects[0].setRotation(physics.getRotation(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));
|
0.0f, cameraCenter->getPosition().z));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
level.hh
2
level.hh
@ -34,7 +34,7 @@ class Level {
|
|||||||
glm::vec4 fogColor;
|
glm::vec4 fogColor;
|
||||||
Light directionalLight;
|
Light directionalLight;
|
||||||
Object* cameraCenter;
|
Object* cameraCenter;
|
||||||
Object* skybox;
|
Object* skydome;
|
||||||
Physics physics;
|
Physics physics;
|
||||||
Camera camera;
|
Camera camera;
|
||||||
Terrain terrain;
|
Terrain terrain;
|
||||||
|
Loading…
Reference in New Issue
Block a user