fish #9

Merged
s452667 merged 10 commits from fish into master 2022-01-08 14:22:36 +01:00
Showing only changes of commit 8821c01e2f - Show all commits

View File

@ -272,8 +272,12 @@ void renderScene()
glm::mat4 submarineModelMatrix = glm::translate(cameraPos + cameraDir) * glm::mat4_cast(glm::inverse(rotation)) * submarineInitialTransformation;
glm::mat4 fishInitialTransformation = glm::translate(glm::vec3(0, 0, 0)) * glm::rotate(glm::radians(180.0f), glm::vec3(0, 1, 0)) * glm::scale(glm::vec3(0.25f));
for (int i = 0; i < 5; i++) {
if (time > -10) {
drawObjectTexture(fishContext, animationMatrix(time + 15), textureFish);
time -= 3;
}
}
drawObjectTexture(submarineContext, submarineModelMatrix, textureSubmarine);
glutSwapBuffers();
}