ryby robia wziu

This commit is contained in:
Mateusz Walas 2021-12-30 14:56:31 +01:00
parent 34c4b58a16
commit 8821c01e2f

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();
}