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
sTypemust beSTRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFOpNextmust beNULLflagsmust be 0imagemust be a validVkImagehandleviewTypemust be a validVkImageViewTypevalueformatmust be a validVkFormatvaluecomponentsmust be a validVkComponentMappingstructuresubresourceRangemust be a validVkImageSubresourceRangestructure- If
imagewas not created withIMAGE_CREATE_CUBE_COMPATIBLE_BITthenviewTypemust not beIMAGE_VIEW_TYPE_CUBEorIMAGE_VIEW_TYPE_CUBE_ARRAY - If the image cubemap arrays feature is not enabled,
viewTypemust not beIMAGE_VIEW_TYPE_CUBE_ARRAY - If the ETC2 texture compression feature is not enabled,
formatmust 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,
formatmust 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,
formatmust 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
imagewas created withIMAGE_TILING_LINEARandusagecontainingIMAGE_USAGE_SAMPLED_BIT,formatmust be supported for sampled images, as specified by theFORMAT_FEATURE_SAMPLED_IMAGE_BITflag inVkFormatProperties::linearTilingFeaturesreturned byGetPhysicalDeviceFormatProperties - If
imagewas created withIMAGE_TILING_LINEARandusagecontainingIMAGE_USAGE_STORAGE_BIT,formatmust be supported for storage images, as specified by theFORMAT_FEATURE_STORAGE_IMAGE_BITflag inVkFormatProperties::linearTilingFeaturesreturned byGetPhysicalDeviceFormatProperties - If
imagewas created withIMAGE_TILING_LINEARandusagecontainingIMAGE_USAGE_COLOR_ATTACHMENT_BIT,formatmust be supported for color attachments, as specified by theFORMAT_FEATURE_COLOR_ATTACHMENT_BITflag inVkFormatProperties::linearTilingFeaturesreturned byGetPhysicalDeviceFormatProperties - If
imagewas created withIMAGE_TILING_LINEARandusagecontainingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,formatmust be supported for depth/stencil attachments, as specified by theFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BITflag inVkFormatProperties::linearTilingFeaturesreturned byGetPhysicalDeviceFormatProperties - If
imagewas created withIMAGE_TILING_OPTIMALandusagecontainingIMAGE_USAGE_SAMPLED_BIT,formatmust be supported for sampled images, as specified by theFORMAT_FEATURE_SAMPLED_IMAGE_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byGetPhysicalDeviceFormatProperties - If
imagewas created withIMAGE_TILING_OPTIMALandusagecontainingIMAGE_USAGE_STORAGE_BIT,formatmust be supported for storage images, as specified by theFORMAT_FEATURE_STORAGE_IMAGE_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byGetPhysicalDeviceFormatProperties - If
imagewas created withIMAGE_TILING_OPTIMALandusagecontainingIMAGE_USAGE_COLOR_ATTACHMENT_BIT,formatmust be supported for color attachments, as specified by theFORMAT_FEATURE_COLOR_ATTACHMENT_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byGetPhysicalDeviceFormatProperties - If
imagewas created withIMAGE_TILING_OPTIMALandusagecontainingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,formatmust be supported for depth/stencil attachments, as specified by theFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byGetPhysicalDeviceFormatProperties subresourceRangemust be a valid image subresource range forimage- If
imagewas created with theIMAGE_CREATE_MUTABLE_FORMAT_BITflag,formatmust be compatible with theformatused to createimage, as defined in Format Compatibility Classes - If
imagewas not created with theIMAGE_CREATE_MUTABLE_FORMAT_BITflag,formatmust be identical to theformatused to createimage subResourceRangeandviewTypemust 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_INFOpNext– reserved for use by extensionsflags– reserved for future useimage– aVkImageon which the view will be createdviewType– the type of the image view. One of:IMAGE_VIEW_TYPE_1DIMAGE_VIEW_TYPE_1D_ARRAYIMAGE_VIEW_TYPE_2DIMAGE_VIEW_TYPE_2D_ARRAYIMAGE_VIEW_TYPE_3DIMAGE_VIEW_TYPE_CUBEIMAGE_VIEW_TYPE_CUBE_ARRAYformat– aVkFormatdescribing 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;VkComponentMappingcomponents;VkImageSubresourceRangesubresourceRange; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkImageViewCreateInfo.BufferAn array ofVkImageViewCreateInfostructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aVkImageViewCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkImageViewCreateInfocalloc()Returns a newVkImageViewCreateInfoinstance allocated withmemCalloc.static VkImageViewCreateInfo.Buffercalloc(int capacity)Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemCalloc.static VkImageViewCreateInfocallocStack()Returns a newVkImageViewCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageViewCreateInfo.BuffercallocStack(int capacity)Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageViewCreateInfo.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageViewCreateInfocallocStack(MemoryStack stack)Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.VkComponentMappingcomponents()Returns aVkComponentMappingview of thecomponentsfield.VkImageViewCreateInfocomponents(VkComponentMapping value)Copies the specifiedVkComponentMappingto thecomponentsfield.static VkImageViewCreateInfocreate()Returns a newVkImageViewCreateInfoinstance allocated withBufferUtils.static VkImageViewCreateInfo.Buffercreate(int capacity)Returns a newVkImageViewCreateInfo.Bufferinstance allocated withBufferUtils.static VkImageViewCreateInfocreate(long address)Returns a newVkImageViewCreateInfoinstance for the specified memory address ornullif the address isNULL.static VkImageViewCreateInfo.Buffercreate(long address, int capacity)Create aVkImageViewCreateInfo.Bufferinstance at the specified memory.intflags()Returns the value of theflagsfield.VkImageViewCreateInfoflags(int value)Sets the specified value to theflagsfield.intformat()Returns the value of theformatfield.VkImageViewCreateInfoformat(int value)Sets the specified value to theformatfield.longimage()Returns the value of theimagefield.VkImageViewCreateInfoimage(long value)Sets the specified value to theimagefield.static VkImageViewCreateInfomalloc()Returns a newVkImageViewCreateInfoinstance allocated withmemAlloc.static VkImageViewCreateInfo.Buffermalloc(int capacity)Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemAlloc.static VkImageViewCreateInfomallocStack()Returns a newVkImageViewCreateInfoinstance allocated on the thread-localMemoryStack.static VkImageViewCreateInfo.BuffermallocStack(int capacity)Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkImageViewCreateInfo.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkImageViewCreateInfomallocStack(MemoryStack stack)Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStack.VkImageViewCreateInfonset(long struct)Unsafe version ofset.longpNext()Returns the value of thepNextfield.VkImageViewCreateInfopNext(long value)Sets the specified value to thepNextfield.VkImageViewCreateInfoset(int sType, long pNext, int flags, long image, int viewType, int format, VkComponentMapping components, VkImageSubresourceRange subresourceRange)Initializes this struct with the specified values.VkImageViewCreateInfoset(VkImageViewCreateInfo src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intsType()Returns the value of thesTypefield.VkImageViewCreateInfosType(int value)Sets the specified value to thesTypefield.VkImageSubresourceRangesubresourceRange()Returns aVkImageSubresourceRangeview of thesubresourceRangefield.VkImageViewCreateInfosubresourceRange(VkImageSubresourceRange value)Copies the specifiedVkImageSubresourceRangeto thesubresourceRangefield.intviewType()Returns the value of theviewTypefield.VkImageViewCreateInfoviewType(int value)Sets the specified value to theviewTypefield.-
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 aVkImageViewCreateInfoinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
image
public long image()
Returns the value of theimagefield.
-
viewType
public int viewType()
Returns the value of theviewTypefield.
-
format
public int format()
Returns the value of theformatfield.
-
components
public VkComponentMapping components()
Returns aVkComponentMappingview of thecomponentsfield.
-
subresourceRange
public VkImageSubresourceRange subresourceRange()
Returns aVkImageSubresourceRangeview of thesubresourceRangefield.
-
sType
public VkImageViewCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkImageViewCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkImageViewCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
image
public VkImageViewCreateInfo image(long value)
Sets the specified value to theimagefield.
-
viewType
public VkImageViewCreateInfo viewType(int value)
Sets the specified value to theviewTypefield.
-
format
public VkImageViewCreateInfo format(int value)
Sets the specified value to theformatfield.
-
components
public VkImageViewCreateInfo components(VkComponentMapping value)
Copies the specifiedVkComponentMappingto thecomponentsfield.
-
subresourceRange
public VkImageViewCreateInfo subresourceRange(VkImageSubresourceRange value)
Copies the specifiedVkImageSubresourceRangeto thesubresourceRangefield.
-
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 newVkImageViewCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkImageViewCreateInfo calloc()
Returns a newVkImageViewCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkImageViewCreateInfo create()
Returns a newVkImageViewCreateInfoinstance allocated withBufferUtils.
-
create
public static VkImageViewCreateInfo create(long address)
Returns a newVkImageViewCreateInfoinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkImageViewCreateInfo.Buffer malloc(int capacity)
Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkImageViewCreateInfo.Buffer calloc(int capacity)
Returns a newVkImageViewCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageViewCreateInfo.Buffer create(int capacity)
Returns a newVkImageViewCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageViewCreateInfo.Buffer create(long address, int capacity)
Create aVkImageViewCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkImageViewCreateInfo mallocStack()
Returns a newVkImageViewCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkImageViewCreateInfo callocStack()
Returns a newVkImageViewCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkImageViewCreateInfo mallocStack(MemoryStack stack)
Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkImageViewCreateInfo callocStack(MemoryStack stack)
Returns a newVkImageViewCreateInfoinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkImageViewCreateInfo.Buffer callocStack(int capacity)
Returns a newVkImageViewCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkImageViewCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageViewCreateInfo.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-