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
|
|
@ -530,16 +530,16 @@ public:
|
|||
{
|
||||
// Tessellation eval
|
||||
glm::mat4 viewMatrix = glm::mat4();
|
||||
uboTE.projection = glm::perspective(deg_to_rad(45.0f), (float)(width* ((splitScreen) ? 0.5f : 1.0f)) / (float)height, 0.1f, 256.0f);
|
||||
uboTE.projection = glm::perspective(glm::radians(45.0f), (float)(width* ((splitScreen) ? 0.5f : 1.0f)) / (float)height, 0.1f, 256.0f);
|
||||
viewMatrix = glm::translate(viewMatrix, glm::vec3(0.0f, 0.0f, zoom));
|
||||
|
||||
float offset = 0.5f;
|
||||
int uboIndex = 1;
|
||||
uboTE.model = glm::mat4();
|
||||
uboTE.model = viewMatrix * glm::translate(uboTE.model, glm::vec3(0, 0, 0));
|
||||
uboTE.model = glm::rotate(uboTE.model, deg_to_rad(rotation.x), glm::vec3(1.0f, 0.0f, 0.0f));
|
||||
uboTE.model = glm::rotate(uboTE.model, deg_to_rad(rotation.y), glm::vec3(0.0f, 1.0f, 0.0f));
|
||||
uboTE.model = glm::rotate(uboTE.model, deg_to_rad(rotation.z), glm::vec3(0.0f, 0.0f, 1.0f));
|
||||
uboTE.model = glm::rotate(uboTE.model, glm::radians(rotation.x), glm::vec3(1.0f, 0.0f, 0.0f));
|
||||
uboTE.model = glm::rotate(uboTE.model, glm::radians(rotation.y), glm::vec3(0.0f, 1.0f, 0.0f));
|
||||
uboTE.model = glm::rotate(uboTE.model, glm::radians(rotation.z), glm::vec3(0.0f, 0.0f, 1.0f));
|
||||
|
||||
uint8_t *pData;
|
||||
VkResult err = vkMapMemory(device, uniformDataTE.memory, 0, sizeof(uboTE), 0, (void **)&pData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue