88 lines
3.1 KiB
Plaintext
88 lines
3.1 KiB
Plaintext
vkCmdClearAttachments(3)
|
|
========================
|
|
|
|
Name
|
|
----
|
|
vkCmdClearAttachments - Clear regions within currently bound framebuffer attachments.
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
include::../protos/vkCmdClearAttachments.txt[]
|
|
|
|
Parameters
|
|
----------
|
|
|
|
pname:commandBuffer::
|
|
The command buffer into which to insert the command.
|
|
|
|
pname:attachmentCount::
|
|
The number of attachments to clear.
|
|
|
|
pname:pAttachments::
|
|
A pointer to an array of structures describing the attachments to clear
|
|
and the values to clear them to.
|
|
|
|
pname:rectCount::
|
|
The number of regions within the attachments to clear.
|
|
|
|
pname:pRects::
|
|
A pointer to an array of rectangles defining the regions to clear.
|
|
|
|
Description
|
|
-----------
|
|
|
|
fname:vkCmdClearAttachments clears regions within the attachments associated
|
|
with the current renderpass. pname:commandBuffer is a handle to the command
|
|
buffer into which to insert the command. A renderpass must be active on
|
|
pname:commandBuffer. pname:attachmentCount specifies the number of attachments
|
|
to clear and pname:pAttachments is a pointer to an array of pname:attachmentCount
|
|
slink:VkClearAttachment structures, each containing the aspect(s), attachment
|
|
index and the clear value for each attachment. The definition of
|
|
slink:VkClearAttachment is:
|
|
|
|
include::../structs/VkClearAttachment.txt[]
|
|
|
|
pname:aspectMask is a bitfield specifying the aspect or aspects to clear
|
|
on the referenced attachment. It is constructed from a bitwise combination
|
|
of the members of the elink:VkImageAspectFlagBits enumeration, the
|
|
definition of which is:
|
|
|
|
include::../enums/VkImageAspectFlagBits.txt[]
|
|
|
|
The pname:colorAttachment member of slink:VkClearAttachment specifies the
|
|
index of the color attachment within the current framebuffer. The pname:clearValue
|
|
member contains the value to which to clear the attachment. It is an instance
|
|
of the slink:VkClearValue union, the definition of which is:
|
|
|
|
include::../structs/VkClearValue.txt[]
|
|
|
|
If the attachment and aspect referenced by ptext:aspectMask and
|
|
ptext:colorAttachment is a color attachment, the the values contained in the
|
|
pname:color field of slink:VkClearValue is used to clear the attachment
|
|
regions. If the attachment and aspect referenced by ptext:aspectMask and
|
|
ptext:colorAttachment is a depth, stencil or depth-stencil attachment, then
|
|
the pname:depthStencil field of slink:VkClearValue is used to clear the
|
|
attachment.
|
|
|
|
The pname:rectCount parameter to fname:vkCmdClearAttachments specifies the
|
|
number of regions of the attachments to clear. pname:pRects is a pointer
|
|
to an array of pname:rectCount slink:VkClearRect structures defining
|
|
those regions. The definition of slink:VkClearRect is:
|
|
|
|
include::../structs/VkClearRect.txt[]
|
|
|
|
The pname:rect member of slink:VkClearRect specifies the rectangle, measured
|
|
in pixels, of the rectangle to clear. pname:baseArrayLayer and
|
|
pname:layerCount specify the first layer and number of layers to clear
|
|
and should be used to clear multiple layers in layered attachments.
|
|
|
|
include::../validity/protos/vkCmdClearAttachments.txt[]
|
|
|
|
See Also
|
|
--------
|
|
|
|
slink:VkClearAttachment, flink:vkCmdBeginRenderPass
|
|
|
|
include::footer.txt[]
|