Code cleanup
This commit is contained in:
parent
1970dcbb0f
commit
121732ad41
1 changed files with 2 additions and 2 deletions
|
|
@ -255,6 +255,8 @@ public:
|
||||||
|
|
||||||
void updateUniformBuffers()
|
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.projection = camera.matrices.perspective;
|
||||||
uniformData.modelView = camera.matrices.view;
|
uniformData.modelView = camera.matrices.view;
|
||||||
memcpy(uniformBuffer.mapped, &uniformData, sizeof(UniformData));
|
memcpy(uniformBuffer.mapped, &uniformData, sizeof(UniformData));
|
||||||
|
|
@ -284,8 +286,6 @@ public:
|
||||||
{
|
{
|
||||||
if (!prepared)
|
if (!prepared)
|
||||||
return;
|
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();
|
updateUniformBuffers();
|
||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue