glm matrix initialization
This commit is contained in:
parent
e7b371eef3
commit
cd8274c294
49 changed files with 127 additions and 127 deletions
|
|
@ -756,9 +756,9 @@ public:
|
|||
void updateUniformBuffersScene()
|
||||
{
|
||||
uboScene.projection = glm::perspective(glm::radians(45.0f), (float)width / (float)height, 1.0f, 256.0f);
|
||||
glm::mat4 viewMatrix = glm::translate(glm::mat4(), glm::vec3(0.0f, 0.0f, zoom));
|
||||
glm::mat4 viewMatrix = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, zoom));
|
||||
|
||||
uboScene.model = glm::mat4();
|
||||
uboScene.model = glm::mat4(1.0f);
|
||||
uboScene.model = viewMatrix * glm::translate(uboScene.model, cameraPos);
|
||||
uboScene.model = glm::rotate(uboScene.model, glm::radians(rotation.x), glm::vec3(1.0f, 0.0f, 0.0f));
|
||||
uboScene.model = glm::rotate(uboScene.model, glm::radians(rotation.y), glm::vec3(0.0f, 1.0f, 0.0f));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue