63 lines
2.0 KiB
Plaintext
63 lines
2.0 KiB
Plaintext
vkCmdSetViewport(3)
|
|
===================
|
|
|
|
Name
|
|
----
|
|
vkCmdSetViewport - Set the viewport on a command buffer.
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
include::../protos/vkCmdSetViewport.txt[]
|
|
|
|
Parameters
|
|
----------
|
|
|
|
pname:commandBuffer::
|
|
The command buffer into which to insert the command.
|
|
|
|
pname:viewportCount::
|
|
The number of viewport rectangles to set.
|
|
|
|
pname:pViewports::
|
|
A pointer to an array of structures describing the viewports.
|
|
|
|
Description
|
|
-----------
|
|
|
|
fname:vkCmdSetViewport sets the dynamic viewport state for the command buffer
|
|
specified in pname:commandBuffer. pname:viewportCount is the number of viewports
|
|
to update and pname:pViewports is a pointer to an array of slink:VkViewport
|
|
structures describing the new viewport state. The definition of slink:VkViewport
|
|
is:
|
|
|
|
include::../structs/VkViewport.txt[]
|
|
|
|
The pname:x and pname:y members of slink:VkViewport specifies the
|
|
upper left corner of the viewport rectangle, in pixels. The pname:width
|
|
and pname:height parameters specify the size of the rectangle, and are also
|
|
expressed in pixels. The pname:minDepth and pname:maxDepth members specify the
|
|
depth range for the viewport.
|
|
|
|
The viewports numbered zero through pname:viewportCount are updated and any
|
|
remaining viewports become undefined.
|
|
|
|
The graphics pipeline bound to pname:commandBuffer must have the
|
|
ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled. When a pipeline
|
|
that does not have ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled is
|
|
first bound, the origins and extents of the viewports are taken from the pipeline and
|
|
attempts to change them using fname:vkCmdSetViewport results in undefined
|
|
behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_VIEWPORT dynamic
|
|
state enabled is first bound, the current values of the viewport rectangle
|
|
origins and extents become undefined and must be set using a call to
|
|
fname:vkCmdSetViewport.
|
|
|
|
include::../validity/protos/vkCmdSetViewport.txt[]
|
|
|
|
See Also
|
|
--------
|
|
|
|
flink:vkCreateGraphicsPipelines, slink:VkPipelineDynamicStateCreateInfo
|
|
|
|
include::footer.txt[]
|