Package org.lwjgl.vulkan
Class VkDescriptorImageInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDescriptorImageInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkDescriptorImageInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying descriptor image info.Description
Members of
VkDescriptorImageInfo
that are not used in an update (as described above) are ignored.Valid Usage
imageView
must not be 2D or 2D array image view created from a 3D image- If
imageView
is created from a depth/stencil image, theaspectMask
used to create theimageView
must include eitherIMAGE_ASPECT_DEPTH_BIT
orIMAGE_ASPECT_STENCIL_BIT
but not both. imageLayout
must match the actualVkImageLayout
of each subresource accessible fromimageView
at the time this descriptor is accessed as defined by the image layout matching rules- If
sampler
is used and theVkFormat
of the image is a multi-planar format, the image must have been created withIMAGE_CREATE_MUTABLE_FORMAT_BIT
, and theaspectMask
of theimageView
must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
or (for three-plane formats only)IMAGE_ASPECT_PLANE_2_BIT
Valid Usage (Implicit)
- Both of
imageView
, andsampler
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
Member documentation
sampler
– a sampler handle, and is used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLER
andDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
if the binding being updated does not use immutable samplers.imageView
– an image view handle, and is used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLED_IMAGE
,DESCRIPTOR_TYPE_STORAGE_IMAGE
,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, andDESCRIPTOR_TYPE_INPUT_ATTACHMENT
.imageLayout
– the layout that the image subresources accessible fromimageView
will be in at the time this descriptor is accessed.imageLayout
is used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLED_IMAGE
,DESCRIPTOR_TYPE_STORAGE_IMAGE
,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, andDESCRIPTOR_TYPE_INPUT_ATTACHMENT
.
Layout
struct VkDescriptorImageInfo { VkSampler sampler; VkImageView imageView; VkImageLayout imageLayout; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkDescriptorImageInfo.Buffer
An array ofVkDescriptorImageInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
IMAGELAYOUT
IMAGEVIEW
SAMPLERThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkDescriptorImageInfo(java.nio.ByteBuffer container)
Creates aVkDescriptorImageInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDescriptorImageInfo
calloc()
Returns a newVkDescriptorImageInfo
instance allocated withmemCalloc
.static VkDescriptorImageInfo.Buffer
calloc(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated withmemCalloc
.static VkDescriptorImageInfo
callocStack()
Returns a newVkDescriptorImageInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorImageInfo.Buffer
callocStack(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorImageInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorImageInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorImageInfo
create()
Returns a newVkDescriptorImageInfo
instance allocated withBufferUtils
.static VkDescriptorImageInfo.Buffer
create(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated withBufferUtils
.static VkDescriptorImageInfo
create(long address)
Returns a newVkDescriptorImageInfo
instance for the specified memory address.static VkDescriptorImageInfo.Buffer
create(long address, int capacity)
Create aVkDescriptorImageInfo.Buffer
instance at the specified memory.static VkDescriptorImageInfo
createSafe(long address)
static VkDescriptorImageInfo.Buffer
createSafe(long address, int capacity)
int
imageLayout()
Returns the value of theimageLayout
field.VkDescriptorImageInfo
imageLayout(int value)
Sets the specified value to theimageLayout
field.long
imageView()
Returns the value of theimageView
field.VkDescriptorImageInfo
imageView(long value)
Sets the specified value to theimageView
field.static VkDescriptorImageInfo
malloc()
Returns a newVkDescriptorImageInfo
instance allocated withmemAlloc
.static VkDescriptorImageInfo.Buffer
malloc(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated withmemAlloc
.static VkDescriptorImageInfo
mallocStack()
Returns a newVkDescriptorImageInfo
instance allocated on the thread-localMemoryStack
.static VkDescriptorImageInfo.Buffer
mallocStack(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkDescriptorImageInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkDescriptorImageInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo
instance allocated on the specifiedMemoryStack
.static int
nimageLayout(long struct)
Unsafe version ofimageLayout()
.static void
nimageLayout(long struct, int value)
Unsafe version ofimageLayout
.static long
nimageView(long struct)
Unsafe version ofimageView()
.static void
nimageView(long struct, long value)
Unsafe version ofimageView
.static long
nsampler(long struct)
Unsafe version ofsampler()
.static void
nsampler(long struct, long value)
Unsafe version ofsampler
.long
sampler()
Returns the value of thesampler
field.VkDescriptorImageInfo
sampler(long value)
Sets the specified value to thesampler
field.VkDescriptorImageInfo
set(long sampler, long imageView, int imageLayout)
Initializes this struct with the specified values.VkDescriptorImageInfo
set(VkDescriptorImageInfo src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
VkDescriptorImageInfo
public VkDescriptorImageInfo(java.nio.ByteBuffer container)
Creates aVkDescriptorImageInfo
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sampler
public long sampler()
Returns the value of thesampler
field.
-
imageView
public long imageView()
Returns the value of theimageView
field.
-
imageLayout
public int imageLayout()
Returns the value of theimageLayout
field.
-
sampler
public VkDescriptorImageInfo sampler(long value)
Sets the specified value to thesampler
field.
-
imageView
public VkDescriptorImageInfo imageView(long value)
Sets the specified value to theimageView
field.
-
imageLayout
public VkDescriptorImageInfo imageLayout(int value)
Sets the specified value to theimageLayout
field.
-
set
public VkDescriptorImageInfo set(long sampler, long imageView, int imageLayout)
Initializes this struct with the specified values.
-
set
public VkDescriptorImageInfo set(VkDescriptorImageInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkDescriptorImageInfo malloc()
Returns a newVkDescriptorImageInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDescriptorImageInfo calloc()
Returns a newVkDescriptorImageInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDescriptorImageInfo create()
Returns a newVkDescriptorImageInfo
instance allocated withBufferUtils
.
-
create
public static VkDescriptorImageInfo create(long address)
Returns a newVkDescriptorImageInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkDescriptorImageInfo createSafe(long address)
-
malloc
public static VkDescriptorImageInfo.Buffer malloc(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDescriptorImageInfo.Buffer calloc(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorImageInfo.Buffer create(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorImageInfo.Buffer create(long address, int capacity)
Create aVkDescriptorImageInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkDescriptorImageInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDescriptorImageInfo mallocStack()
Returns a newVkDescriptorImageInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDescriptorImageInfo callocStack()
Returns a newVkDescriptorImageInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDescriptorImageInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDescriptorImageInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkDescriptorImageInfo.Buffer mallocStack(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDescriptorImageInfo.Buffer callocStack(int capacity)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDescriptorImageInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkDescriptorImageInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nsampler
public static long nsampler(long struct)
Unsafe version ofsampler()
.
-
nimageView
public static long nimageView(long struct)
Unsafe version ofimageView()
.
-
nimageLayout
public static int nimageLayout(long struct)
Unsafe version ofimageLayout()
.
-
nsampler
public static void nsampler(long struct, long value)
Unsafe version ofsampler
.
-
nimageView
public static void nimageView(long struct, long value)
Unsafe version ofimageView
.
-
nimageLayout
public static void nimageLayout(long struct, int value)
Unsafe version ofimageLayout
.
-
-