Added a update function to the level which rotates the bunny.
This commit is contained in:
parent
f5a1864472
commit
16f4890458
@ -40,6 +40,9 @@ void deleteCustomResources()
|
||||
|
||||
void draw(float runTime)
|
||||
{
|
||||
// update Level first TODO: move this with the rest of the stuff that doesn't belong here to main
|
||||
level.update(runTime);
|
||||
|
||||
// clear the framebuffer:
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
|
5
level.cc
5
level.cc
@ -41,6 +41,11 @@ void Level::render() {
|
||||
this->terrain.render();
|
||||
}
|
||||
|
||||
void Level::update(float runTime) {
|
||||
// rotate bunny
|
||||
objects[0].setRotation(glm::vec3(0.0f, 1.0472f * runTime, 0.0f));
|
||||
}
|
||||
|
||||
glm::vec3 Level::getAmbientLight() {
|
||||
return ambientLight;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user