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

@ -637,7 +637,7 @@ public:
};
for (auto v : pos) {
glm::mat4 mvpMatrix = glm::perspective(glm::radians(60.0f), (float)width / (float)height, 0.1f, 256.0f) * glm::translate(glm::mat4(), v);
glm::mat4 mvpMatrix = glm::perspective(glm::radians(60.0f), (float)width / (float)height, 0.1f, 256.0f) * glm::translate(glm::mat4(1.0f), v);
vkCmdPushConstants(commandBuffer, pipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(mvpMatrix), &mvpMatrix);
vkCmdDrawIndexed(commandBuffer, 3, 1, 0, 0, 0);
}