Add first_scissor to cmd_set_scissor

This commit is contained in:
Eidolon 2018-04-11 21:30:30 -05:00
parent c7fecbf25e
commit 26394b1d3c
3 changed files with 9 additions and 4 deletions

View file

@ -685,10 +685,15 @@ pub trait DeviceV1_0 {
.cmd_bind_pipeline(command_buffer, pipeline_bind_point, pipeline);
}
unsafe fn cmd_set_scissor(&self, command_buffer: vk::CommandBuffer, scissors: &[vk::Rect2D]) {
unsafe fn cmd_set_scissor(
&self,
command_buffer: vk::CommandBuffer,
first_scissor: vk::uint32_t,
scissors: &[vk::Rect2D],
) {
self.fp_v1_0().cmd_set_scissor(
command_buffer,
0,
first_scissor,
scissors.len() as vk::uint32_t,
scissors.as_ptr(),
);

View file

@ -910,7 +910,7 @@ fn main() {
vk::PipelineBindPoint::Graphics,
graphic_pipeline);
device.cmd_set_viewport(draw_command_buffer, 0, &viewports);
device.cmd_set_scissor(draw_command_buffer, &scissors);
device.cmd_set_scissor(draw_command_buffer, 0, &scissors);
device
.cmd_bind_vertex_buffers(draw_command_buffer, 0, &[vertex_input_buffer], &[0]);
device.cmd_bind_index_buffer(draw_command_buffer,

View file

@ -510,7 +510,7 @@ fn main() {
graphic_pipeline,
);
device.cmd_set_viewport(draw_command_buffer, 0, &viewports);
device.cmd_set_scissor(draw_command_buffer, &scissors);
device.cmd_set_scissor(draw_command_buffer, 0, &scissors);
device.cmd_bind_vertex_buffers(
draw_command_buffer,
0,