Package org.lwjgl.vulkan
Class VkImageViewCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageViewCreateInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkImageViewCreateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationValid Usage
sType
must beSTRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
pNext
must beNULL
flags
must be 0image
must be a validVkImage
handleviewType
must be a validVkImageViewType
valueformat
must be a validVkFormat
valuecomponents
must be a validVkComponentMapping
structuresubresourceRange
must be a validVkImageSubresourceRange
structure- If
image
was not created withIMAGE_CREATE_CUBE_COMPATIBLE_BIT
thenviewType
must not beIMAGE_VIEW_TYPE_CUBE
orIMAGE_VIEW_TYPE_CUBE_ARRAY
- If the image cubemap arrays feature is not enabled,
viewType
must not beIMAGE_VIEW_TYPE_CUBE_ARRAY
- If the ETC2 texture compression feature is not enabled,
format
must not beFORMAT_ETC2_R8G8B8_UNORM_BLOCK
,FORMAT_ETC2_R8G8B8_SRGB_BLOCK
,FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK
,FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK
,FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK
,FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK
,FORMAT_EAC_R11_UNORM_BLOCK
,FORMAT_EAC_R11_SNORM_BLOCK
,FORMAT_EAC_R11G11_UNORM_BLOCK
, orFORMAT_EAC_R11G11_SNORM_BLOCK
- If the ASTC LDR texture compression feature is not enabled,
format
must not beFORMAT_ASTC_4x4_UNORM_BLOCK
,FORMAT_ASTC_4x4_SRGB_BLOCK
,FORMAT_ASTC_5x4_UNORM_BLOCK
,FORMAT_ASTC_5x4_SRGB_BLOCK
,FORMAT_ASTC_5x5_UNORM_BLOCK
,FORMAT_ASTC_5x5_SRGB_BLOCK
,FORMAT_ASTC_6x5_UNORM_BLOCK
,FORMAT_ASTC_6x5_SRGB_BLOCK
,FORMAT_ASTC_6x6_UNORM_BLOCK
,FORMAT_ASTC_6x6_SRGB_BLOCK
,FORMAT_ASTC_8x5_UNORM_BLOCK
,FORMAT_ASTC_8x5_SRGB_BLOCK
,FORMAT_ASTC_8x6_UNORM_BLOCK
,FORMAT_ASTC_8x6_SRGB_BLOCK
,FORMAT_ASTC_8x8_UNORM_BLOCK
,FORMAT_ASTC_8x8_SRGB_BLOCK
,FORMAT_ASTC_10x5_UNORM_BLOCK
,FORMAT_ASTC_10x5_SRGB_BLOCK
,FORMAT_ASTC_10x6_UNORM_BLOCK
,FORMAT_ASTC_10x6_SRGB_BLOCK
,FORMAT_ASTC_10x8_UNORM_BLOCK
,FORMAT_ASTC_10x8_SRGB_BLOCK
,FORMAT_ASTC_10x10_UNORM_BLOCK
,FORMAT_ASTC_10x10_SRGB_BLOCK
,FORMAT_ASTC_12x10_UNORM_BLOCK
,FORMAT_ASTC_12x10_SRGB_BLOCK
,FORMAT_ASTC_12x12_UNORM_BLOCK
, orFORMAT_ASTC_12x12_SRGB_BLOCK
- If the BC texture compression feature is not enabled,
format
must not beFORMAT_BC1_RGB_UNORM_BLOCK
,FORMAT_BC1_RGB_SRGB_BLOCK
,FORMAT_BC1_RGBA_UNORM_BLOCK
,FORMAT_BC1_RGBA_SRGB_BLOCK
,FORMAT_BC2_UNORM_BLOCK
,FORMAT_BC2_SRGB_BLOCK
,FORMAT_BC3_UNORM_BLOCK
,FORMAT_BC3_SRGB_BLOCK
,FORMAT_BC4_UNORM_BLOCK
,FORMAT_BC4_SNORM_BLOCK
,FORMAT_BC5_UNORM_BLOCK
,FORMAT_BC5_SNORM_BLOCK
,FORMAT_BC6H_UFLOAT_BLOCK
,FORMAT_BC6H_SFLOAT_BLOCK
,FORMAT_BC7_UNORM_BLOCK
, orFORMAT_BC7_SRGB_BLOCK
- If
image
was created withIMAGE_TILING_LINEAR
andusage
containingIMAGE_USAGE_SAMPLED_BIT
,format
must be supported for sampled images, as specified by theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
flag inVkFormatProperties
::linearTilingFeatures
returned byGetPhysicalDeviceFormatProperties
- If
image
was created withIMAGE_TILING_LINEAR
andusage
containingIMAGE_USAGE_STORAGE_BIT
,format
must be supported for storage images, as specified by theFORMAT_FEATURE_STORAGE_IMAGE_BIT
flag inVkFormatProperties
::linearTilingFeatures
returned byGetPhysicalDeviceFormatProperties
- If
image
was created withIMAGE_TILING_LINEAR
andusage
containingIMAGE_USAGE_COLOR_ATTACHMENT_BIT
,format
must be supported for color attachments, as specified by theFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
flag inVkFormatProperties
::linearTilingFeatures
returned byGetPhysicalDeviceFormatProperties
- If
image
was created withIMAGE_TILING_LINEAR
andusage
containingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
,format
must be supported for depth/stencil attachments, as specified by theFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
flag inVkFormatProperties
::linearTilingFeatures
returned byGetPhysicalDeviceFormatProperties
- If
image
was created withIMAGE_TILING_OPTIMAL
andusage
containingIMAGE_USAGE_SAMPLED_BIT
,format
must be supported for sampled images, as specified by theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
flag inVkFormatProperties
::optimalTilingFeatures
returned byGetPhysicalDeviceFormatProperties
- If
image
was created withIMAGE_TILING_OPTIMAL
andusage
containingIMAGE_USAGE_STORAGE_BIT
,format
must be supported for storage images, as specified by theFORMAT_FEATURE_STORAGE_IMAGE_BIT
flag inVkFormatProperties
::optimalTilingFeatures
returned byGetPhysicalDeviceFormatProperties
- If
image
was created withIMAGE_TILING_OPTIMAL
andusage
containingIMAGE_USAGE_COLOR_ATTACHMENT_BIT
,format
must be supported for color attachments, as specified by theFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
flag inVkFormatProperties
::optimalTilingFeatures
returned byGetPhysicalDeviceFormatProperties
- If
image
was created withIMAGE_TILING_OPTIMAL
andusage
containingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
,format
must be supported for depth/stencil attachments, as specified by theFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
flag inVkFormatProperties
::optimalTilingFeatures
returned byGetPhysicalDeviceFormatProperties
subresourceRange
must be a valid image subresource range forimage
- If
image
was created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
flag,format
must be compatible with theformat
used to createimage
, as defined in Format Compatibility Classes - If
image
was not created with theIMAGE_CREATE_MUTABLE_FORMAT_BIT
flag,format
must be identical to theformat
used to createimage
subResourceRange
andviewType
must be compatible with the image, as described in the table below
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
pNext
– reserved for use by extensionsflags
– reserved for future useimage
– aVkImage
on which the view will be createdviewType
– the type of the image view. One of:IMAGE_VIEW_TYPE_1D
IMAGE_VIEW_TYPE_1D_ARRAY
IMAGE_VIEW_TYPE_2D
IMAGE_VIEW_TYPE_2D_ARRAY
IMAGE_VIEW_TYPE_3D
IMAGE_VIEW_TYPE_CUBE
IMAGE_VIEW_TYPE_CUBE_ARRAY
format
– aVkFormat
describing the format and type used to interpret data elements in the imagecomponents
– a remapping of color components (or of depth or stencil components after they have been converted into color components)subresourceRange
– selects the set of mipmap levels and array layers to be accessible to the view
Layout
struct VkImageViewCreateInfo { VkStructureType sType; const void * pNext; VkImageViewCreateFlags flags; VkImage image; VkImageViewType viewType; VkFormat format;
VkComponentMapping
components;VkImageSubresourceRange
subresourceRange; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkImageViewCreateInfo.Buffer
An array ofVkImageViewCreateInfo
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkImageViewCreateInfo(java.nio.ByteBuffer container)
Creates aVkImageViewCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkImageViewCreateInfo
calloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemCalloc
.static VkImageViewCreateInfo.Buffer
calloc(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemCalloc
.static VkImageViewCreateInfo
callocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageViewCreateInfo
callocStack(MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.VkComponentMapping
components()
Returns aVkComponentMapping
view of thecomponents
field.VkImageViewCreateInfo
components(VkComponentMapping value)
Copies the specifiedVkComponentMapping
to thecomponents
field.static VkImageViewCreateInfo
create()
Returns a newVkImageViewCreateInfo
instance allocated withBufferUtils
.static VkImageViewCreateInfo.Buffer
create(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withBufferUtils
.static VkImageViewCreateInfo
create(long address)
Returns a newVkImageViewCreateInfo
instance for the specified memory address ornull
if the address isNULL
.static VkImageViewCreateInfo.Buffer
create(long address, int capacity)
Create aVkImageViewCreateInfo.Buffer
instance at the specified memory.int
flags()
Returns the value of theflags
field.VkImageViewCreateInfo
flags(int value)
Sets the specified value to theflags
field.int
format()
Returns the value of theformat
field.VkImageViewCreateInfo
format(int value)
Sets the specified value to theformat
field.long
image()
Returns the value of theimage
field.VkImageViewCreateInfo
image(long value)
Sets the specified value to theimage
field.static VkImageViewCreateInfo
malloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemAlloc
.static VkImageViewCreateInfo.Buffer
malloc(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemAlloc
.static VkImageViewCreateInfo
mallocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
.static VkImageViewCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageViewCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageViewCreateInfo
mallocStack(MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
.VkImageViewCreateInfo
nset(long struct)
Unsafe version ofset
.long
pNext()
Returns the value of thepNext
field.VkImageViewCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.VkImageViewCreateInfo
set(int sType, long pNext, int flags, long image, int viewType, int format, VkComponentMapping components, VkImageSubresourceRange subresourceRange)
Initializes this struct with the specified values.VkImageViewCreateInfo
set(VkImageViewCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkImageViewCreateInfo
sType(int value)
Sets the specified value to thesType
field.VkImageSubresourceRange
subresourceRange()
Returns aVkImageSubresourceRange
view of thesubresourceRange
field.VkImageViewCreateInfo
subresourceRange(VkImageSubresourceRange value)
Copies the specifiedVkImageSubresourceRange
to thesubresourceRange
field.int
viewType()
Returns the value of theviewType
field.VkImageViewCreateInfo
viewType(int value)
Sets the specified value to theviewType
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkImageViewCreateInfo
public VkImageViewCreateInfo(java.nio.ByteBuffer container)
Creates aVkImageViewCreateInfo
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
image
public long image()
Returns the value of theimage
field.
-
viewType
public int viewType()
Returns the value of theviewType
field.
-
format
public int format()
Returns the value of theformat
field.
-
components
public VkComponentMapping components()
Returns aVkComponentMapping
view of thecomponents
field.
-
subresourceRange
public VkImageSubresourceRange subresourceRange()
Returns aVkImageSubresourceRange
view of thesubresourceRange
field.
-
sType
public VkImageViewCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkImageViewCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkImageViewCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
image
public VkImageViewCreateInfo image(long value)
Sets the specified value to theimage
field.
-
viewType
public VkImageViewCreateInfo viewType(int value)
Sets the specified value to theviewType
field.
-
format
public VkImageViewCreateInfo format(int value)
Sets the specified value to theformat
field.
-
components
public VkImageViewCreateInfo components(VkComponentMapping value)
Copies the specifiedVkComponentMapping
to thecomponents
field.
-
subresourceRange
public VkImageViewCreateInfo subresourceRange(VkImageSubresourceRange value)
Copies the specifiedVkImageSubresourceRange
to thesubresourceRange
field.
-
set
public VkImageViewCreateInfo set(int sType, long pNext, int flags, long image, int viewType, int format, VkComponentMapping components, VkImageSubresourceRange subresourceRange)
Initializes this struct with the specified values.
-
nset
public VkImageViewCreateInfo nset(long struct)
Unsafe version ofset
.
-
set
public VkImageViewCreateInfo set(VkImageViewCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkImageViewCreateInfo malloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageViewCreateInfo calloc()
Returns a newVkImageViewCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageViewCreateInfo create()
Returns a newVkImageViewCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkImageViewCreateInfo create(long address)
Returns a newVkImageViewCreateInfo
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkImageViewCreateInfo.Buffer malloc(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageViewCreateInfo.Buffer calloc(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageViewCreateInfo.Buffer create(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageViewCreateInfo.Buffer create(long address, int capacity)
Create aVkImageViewCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkImageViewCreateInfo mallocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageViewCreateInfo callocStack()
Returns a newVkImageViewCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageViewCreateInfo mallocStack(MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageViewCreateInfo callocStack(MemoryStack stack)
Returns a newVkImageViewCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkImageViewCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageViewCreateInfo.Buffer callocStack(int capacity)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkImageViewCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkImageViewCreateInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkImageViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-