glm matrix initialization

This commit is contained in:
saschawillems 2017-09-24 18:17:07 +02:00
parent e7b371eef3
commit cd8274c294
49 changed files with 127 additions and 127 deletions

View file

@ -468,11 +468,11 @@ public:
void updateUniformBuffers()
{
// Tessellation eval
glm::mat4 viewMatrix = glm::mat4();
glm::mat4 viewMatrix = glm::mat4(1.0f);
uboTessEval.projection = glm::perspective(glm::radians(45.0f), (float)(width) / (float)height, 0.1f, 256.0f);
viewMatrix = glm::translate(viewMatrix, glm::vec3(0.0f, 0.0f, zoom));
uboTessEval.model = glm::mat4();
uboTessEval.model = glm::mat4(1.0f);
uboTessEval.model = viewMatrix * glm::translate(uboTessEval.model, glm::vec3(0, 0, 0));
uboTessEval.model = glm::rotate(uboTessEval.model, glm::radians(rotation.x), glm::vec3(1.0f, 0.0f, 0.0f));
uboTessEval.model = glm::rotate(uboTessEval.model, glm::radians(rotation.y), glm::vec3(0.0f, 1.0f, 0.0f));