Refactor material system (#382)

This commit is contained in:
Jérôme Leclercq
2022-10-31 19:53:41 +01:00
committed by GitHub
parent 0a8048809c
commit dc6ce8427c
156 changed files with 3633 additions and 4569 deletions

View File

@@ -251,7 +251,7 @@ namespace Nz
{
context->ResetColorWriteMasks();
Color color = command.clearValues[colorAttachmentIndex].color;
const Color& color = command.clearValues[colorAttachmentIndex].color;
context->glClearColor(color.r, color.g, color.b, color.a);
clearFields |= GL_COLOR_BUFFER_BIT;
@@ -286,7 +286,12 @@ namespace Nz
}
if (clearFields)
{
const Vector2ui& size = command.framebuffer->GetSize();
context->SetScissorBox(0, 0, size.x, size.y);
context->SetViewport(0, 0, size.x, size.y);
context->glClear(clearFields);
}
}
if (!invalidateAttachments.empty())