Use glm::radians instead of deg_to_rad (Fixes #37)
This commit is contained in:
parent
575cbdc341
commit
e77884d5bb
25 changed files with 129 additions and 131 deletions
|
|
@ -540,14 +540,14 @@ public:
|
|||
|
||||
void updateUniformBuffers()
|
||||
{
|
||||
uboVS.projectionMatrix = glm::perspective(deg_to_rad(60.0f), (float)(width / 3.0f) / (float)height, 0.1f, 256.0f);
|
||||
uboVS.projectionMatrix = glm::perspective(glm::radians(60.0f), (float)(width / 3.0f) / (float)height, 0.1f, 256.0f);
|
||||
|
||||
uboVS.viewMatrix = glm::translate(glm::mat4(), glm::vec3(0.0f, 0.0f, zoom));
|
||||
|
||||
uboVS.modelMatrix = glm::mat4();
|
||||
uboVS.modelMatrix = glm::rotate(uboVS.modelMatrix, deg_to_rad(rotation.x), glm::vec3(1.0f, 0.0f, 0.0f));
|
||||
uboVS.modelMatrix = glm::rotate(uboVS.modelMatrix, deg_to_rad(rotation.y), glm::vec3(0.0f, 1.0f, 0.0f));
|
||||
uboVS.modelMatrix = glm::rotate(uboVS.modelMatrix, deg_to_rad(rotation.z), glm::vec3(0.0f, 0.0f, 1.0f));
|
||||
uboVS.modelMatrix = glm::rotate(uboVS.modelMatrix, glm::radians(rotation.x), glm::vec3(1.0f, 0.0f, 0.0f));
|
||||
uboVS.modelMatrix = glm::rotate(uboVS.modelMatrix, glm::radians(rotation.y), glm::vec3(0.0f, 1.0f, 0.0f));
|
||||
uboVS.modelMatrix = glm::rotate(uboVS.modelMatrix, glm::radians(rotation.z), glm::vec3(0.0f, 0.0f, 1.0f));
|
||||
|
||||
uint8_t *pData;
|
||||
VkResult err = vkMapMemory(device, uniformDataVS.memory, 0, sizeof(uboVS), 0, (void **)&pData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue