Add and Implement CommandBuffer::SetScissorRect

This commit is contained in:
Corentin Wallez
2018-02-13 14:57:13 -05:00
committed by Corentin Wallez
parent 234111c379
commit a3c89cc27a
9 changed files with 85 additions and 2 deletions

View File

@@ -275,6 +275,17 @@ namespace backend { namespace vulkan {
cmd->reference);
} break;
case Command::SetScissorRect: {
SetScissorRectCmd* cmd = mCommands.NextCommand<SetScissorRectCmd>();
VkRect2D rect;
rect.offset.x = cmd->x;
rect.offset.y = cmd->y;
rect.extent.width = cmd->width;
rect.extent.height = cmd->height;
device->fn.CmdSetScissor(commands, 0, 1, &rect);
} break;
case Command::SetVertexBuffers: {
SetVertexBuffersCmd* cmd = mCommands.NextCommand<SetVertexBuffersCmd>();
auto buffers = mCommands.NextData<Ref<BufferBase>>(cmd->count);