Code cleanup

This commit is contained in:
Sascha Willems 2024-01-07 20:40:31 +01:00
parent 1970dcbb0f
commit 121732ad41

View file

@ -255,6 +255,8 @@ public:
void updateUniformBuffers()
{
// Override the base sample camera setup, since we use three viewports
camera.setPerspective(60.0f, (float)(width / 3.0f) / (float)height, 0.1f, 256.0f);
uniformData.projection = camera.matrices.perspective;
uniformData.modelView = camera.matrices.view;
memcpy(uniformBuffer.mapped, &uniformData, sizeof(UniformData));
@ -284,8 +286,6 @@ public:
{
if (!prepared)
return;
// Override the base sample camera setup, since we use three viewports
camera.setPerspective(60.0f, (float)(width / 3.0f) / (float)height, 0.1f, 256.0f);
updateUniformBuffers();
draw();
}