76 lines
2.3 KiB
Plaintext
76 lines
2.3 KiB
Plaintext
// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
|
|
// Creative Commons Attribution 4.0 International License; see
|
|
// http://creativecommons.org/licenses/by/4.0/
|
|
|
|
vkCmdSetScissor(3)
|
|
==================
|
|
|
|
Name
|
|
----
|
|
vkCmdSetScissor - Set the dynamic scissor rectangles on a command buffer.
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
// refBegin vkCmdSetScissor Set the dynamic scissor rectangles on a command buffer.
|
|
|
|
The scissor test determines if a fragment's framebuffer coordinates
|
|
latexmath:[$(x_f,y_f)$] lie within the scissor rectangle corresponding to
|
|
the viewport index (see <<vertexpostproc-viewport,Controlling the
|
|
Viewport>>) used by the primitive that generated the fragment. If the
|
|
pipeline state object is created without ename:VK_DYNAMIC_STATE_SCISSOR
|
|
enabled then the scissor rectangles are set by the
|
|
slink:VkPipelineViewportStateCreateInfo state of the pipeline state object.
|
|
Otherwise, to dynamically set the scissor rectangles call:
|
|
|
|
include::../api/protos/vkCmdSetScissor.txt[]
|
|
|
|
|
|
Parameters
|
|
----------
|
|
|
|
* pname:commandBuffer is the command buffer into which the command will be
|
|
recorded.
|
|
* pname:firstScissor is the index of the first scissor whose state is
|
|
updated by the command.
|
|
* pname:scissorCount is the number of scissors whose rectangles are
|
|
updated by the command.
|
|
* pname:pScissors is a pointer to an array of slink:VkRect2D structures
|
|
defining scissor rectangles.
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
The scissor rectangles taken from element latexmath:[$i$] of pname:pScissors
|
|
replace the current state for the scissor index
|
|
latexmath:[$\mathit{firstScissor}+i$], for latexmath:[$i$] in
|
|
latexmath:[$[0, scissorCount)$].
|
|
|
|
Each scissor rectangle is described by a slink:VkRect2D structure, with the
|
|
pname:offset.x and pname:offset.y values determining the upper left corner
|
|
of the scissor rectangle, and the pname:extent.width and pname:extent.height
|
|
values determining the size in pixels.
|
|
|
|
include::../validity/protos/vkCmdSetScissor.txt[]
|
|
|
|
|
|
See Also
|
|
--------
|
|
|
|
slink:VkCommandBuffer, slink:VkRect2D
|
|
|
|
|
|
Document Notes
|
|
--------------
|
|
|
|
For more information, see the Vulkan Specification at URL
|
|
|
|
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkCmdSetScissor
|
|
|
|
This page is extracted from the Vulkan Specification.
|
|
Fixes and changes should be made to the Specification,not directly.
|
|
|
|
include::footer.txt[]
|
|
|