Merge pull request #58 from HybridEidolon/first_scissor

Add first_scissor to cmd_set_scissor
This commit is contained in:
Maik Klein 2018-04-12 11:08:30 +02:00 committed by GitHub
commit 8a37c2c276
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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); .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( self.fp_v1_0().cmd_set_scissor(
command_buffer, command_buffer,
0, first_scissor,
scissors.len() as vk::uint32_t, scissors.len() as vk::uint32_t,
scissors.as_ptr(), scissors.as_ptr(),
); );

View file

@ -910,7 +910,7 @@ fn main() {
vk::PipelineBindPoint::Graphics, vk::PipelineBindPoint::Graphics,
graphic_pipeline); graphic_pipeline);
device.cmd_set_viewport(draw_command_buffer, 0, &viewports); 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 device
.cmd_bind_vertex_buffers(draw_command_buffer, 0, &[vertex_input_buffer], &[0]); .cmd_bind_vertex_buffers(draw_command_buffer, 0, &[vertex_input_buffer], &[0]);
device.cmd_bind_index_buffer(draw_command_buffer, device.cmd_bind_index_buffer(draw_command_buffer,

View file

@ -510,7 +510,7 @@ fn main() {
graphic_pipeline, graphic_pipeline,
); );
device.cmd_set_viewport(draw_command_buffer, 0, &viewports); 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( device.cmd_bind_vertex_buffers(
draw_command_buffer, draw_command_buffer,
0, 0,