Vulkan-Docs/doc/specs/vulkan/man/vkCreateImageView.txt

60 lines
2.0 KiB
Plaintext

vkCreateImageView(3)
====================
Name
----
vkCreateImageView - Create an image view from an existing image.
C Specification
---------------
include::../protos/vkCreateImageView.txt[]
Parameters
----------
pname:device::
Logical device which owns the image.
pname:pCreateInfo::
Specifies properties of the new view.
pname:pView::
Returns the requested object.
Description
-----------
fname:vkCreateImageView creates a new view of a source image in a compatible format, alowing casting
of image data from one format to another. Image views may be bound into descriptor sets to allow them
to be accessed in shaders, or be bound as color attachments. pname:device specifies the device that
is to be used to create the new view. pname:pCreateInfo is a pointer to an instance of the
slink:VkImageViewCreateInfo structure defining the properties of the new view object. The definition
of slink:VkImageViewCreateInfo is:
include::../structs/VkImageViewCreateInfo.txt[]
The pname:sType member of pname:pCreateInfo should be ename:VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO.
The pname:image member contains the handle to the parent object of which to create a view. pname:viewType
specifies the type of view to be created and should be a member of the elink:VkImageViewType enumeration,
the definition of which is:
include::../enums/VkImageViewType.txt[]
The pname:format member of pname:pCreateInfo specifies the image format for the newly created view and
should be compatible with the base format of the parent image specified in pname:image. The pname:components
member is an instance of the slink:VkComponentMapping structure which defines component ordering for data
read from the view. The pname:subresourceRange member of the pname:pCreateInfo specifies the
range of the parent resource to be visible through the new view.
The pname:flags member of pname:pCreateInfo is reserved and must be 0.
include::../validity/protos/vkCreateImageView.txt[]
See Also
--------
flink:vkCreateImage, flink:vkCreateBuffer, flink:vkCreateBufferView
include::footer.txt[]