add rendering fish texture
This commit is contained in:
parent
b98f0f3f72
commit
d990a0e8af
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -187,8 +187,8 @@ void renderScene()
|
|||||||
|
|
||||||
glm::mat4 fishInitialTransformation = glm::translate(glm::vec3(-1, 0, -0.5)) * glm::rotate(glm::radians(180.0f), glm::vec3(0, 1, 0)) * glm::scale(glm::vec3(0.25f));
|
glm::mat4 fishInitialTransformation = glm::translate(glm::vec3(-1, 0, -0.5)) * glm::rotate(glm::radians(180.0f), glm::vec3(0, 1, 0)) * glm::scale(glm::vec3(0.25f));
|
||||||
glm::mat4 fishModelMatrix = glm::translate(cameraPos + cameraDir) * glm::mat4_cast(glm::inverse(rotation)) * fishInitialTransformation;
|
glm::mat4 fishModelMatrix = glm::translate(cameraPos + cameraDir) * glm::mat4_cast(glm::inverse(rotation)) * fishInitialTransformation;
|
||||||
drawObjectColor(fishContext, fishModelMatrix, glm::vec3(0.6f));
|
//drawObjectColor(fishContext, fishModelMatrix, glm::vec3(0.6f));
|
||||||
|
drawObjectTexture(fishContext, fishModelMatrix, textureFish);
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user