// 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/ vkCmdSetViewport(3) =================== Name ---- vkCmdSetViewport - Set the viewport on a command buffer. C Specification --------------- // refBegin vkCmdSetViewport Set the viewport on a command buffer. If the bound pipeline state object was not created with the ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled, viewport transformation parameters are specified using the pname:pViewports member of sname:VkPipelineViewportStateCreateInfo in the pipeline state object. If the pipeline state object was created with the ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled, the viewport transformation parameters are dynamically set and changed with the command: include::../api/protos/vkCmdSetViewport.txt[] Parameters ---------- * pname:commandBuffer is the command buffer into which the command will be recorded. * pname:firstViewport is the index of the first viewport whose parameters are updated by the command. * pname:viewportCount is the number of viewports whose parameters are updated by the command. * pname:pViewports is a pointer to an array of slink:VkViewport structures specifying viewport parameters. Description ----------- The viewport parameters taken from element latexmath:[$i$] of pname:pViewports replace the current state for the viewport index latexmath:[$\mathit{firstViewport}+i$], for latexmath:[$i$] in latexmath:[$[0, viewportCount)$]. include::../validity/protos/vkCmdSetViewport.txt[] See Also -------- slink:VkCommandBuffer, slink:VkViewport Document Notes -------------- For more information, see the Vulkan Specification at URL https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkCmdSetViewport This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly. include::footer.txt[]