C Specification
To dynamically set the scissor rectangles, call:
// Provided by VK_VERSION_1_0
void vkCmdSetScissor(
VkCommandBuffer commandBuffer,
uint32_t firstScissor,
uint32_t scissorCount,
const VkRect2D* pScissors);
Parameters
-
commandBuffer
is the command buffer into which the command will be recorded. -
firstScissor
is the index of the first scissor whose state is updated by the command. -
scissorCount
is the number of scissors whose rectangles are updated by the command. -
pScissors
is a pointer to an array of VkRect2D structures defining scissor rectangles.
Description
The scissor rectangles taken from element i of pScissors
replace
the current state for the scissor index firstScissor
+ i,
for i in [0, scissorCount
).
This command sets the scissor rectangles for subsequent drawing commands
when drawing using shader objects, or
when the graphics pipeline is created with VK_DYNAMIC_STATE_SCISSOR
set in VkPipelineDynamicStateCreateInfo::pDynamicStates
.
Otherwise, this state is specified by the
VkPipelineViewportStateCreateInfo::pScissors
values used to
create the currently active pipeline.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.