Package org.lwjgl.vulkan
Class VkImageSubresource
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageSubresource
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkImageSubresource extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying an image subresource.Valid Usage (Implicit)
aspectMask
must be a valid combination ofVkImageAspectFlagBits
valuesaspectMask
must not be 0
See Also
VkSparseImageMemoryBind
,GetImageSubresourceLayout
Member documentation
aspectMask
– aVkImageAspectFlags
selecting the image aspect.mipLevel
– selects the mipmap level.arrayLayer
– selects the array layer.
Layout
struct VkImageSubresource { VkImageAspectFlags aspectMask; uint32_t mipLevel; uint32_t arrayLayer; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkImageSubresource.Buffer
An array ofVkImageSubresource
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ARRAYLAYER
ASPECTMASK
MIPLEVELThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkImageSubresource(java.nio.ByteBuffer container)
Creates aVkImageSubresource
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
arrayLayer()
Returns the value of thearrayLayer
field.VkImageSubresource
arrayLayer(int value)
Sets the specified value to thearrayLayer
field.int
aspectMask()
Returns the value of theaspectMask
field.VkImageSubresource
aspectMask(int value)
Sets the specified value to theaspectMask
field.static VkImageSubresource
calloc()
Returns a newVkImageSubresource
instance allocated withmemCalloc
.static VkImageSubresource.Buffer
calloc(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated withmemCalloc
.static VkImageSubresource
callocStack()
Returns a newVkImageSubresource
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageSubresource.Buffer
callocStack(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageSubresource.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageSubresource
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageSubresource
create()
Returns a newVkImageSubresource
instance allocated withBufferUtils
.static VkImageSubresource.Buffer
create(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated withBufferUtils
.static VkImageSubresource
create(long address)
Returns a newVkImageSubresource
instance for the specified memory address.static VkImageSubresource.Buffer
create(long address, int capacity)
Create aVkImageSubresource.Buffer
instance at the specified memory.static VkImageSubresource
createSafe(long address)
static VkImageSubresource.Buffer
createSafe(long address, int capacity)
static VkImageSubresource
malloc()
Returns a newVkImageSubresource
instance allocated withmemAlloc
.static VkImageSubresource.Buffer
malloc(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated withmemAlloc
.static VkImageSubresource
mallocStack()
Returns a newVkImageSubresource
instance allocated on the thread-localMemoryStack
.static VkImageSubresource.Buffer
mallocStack(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageSubresource.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageSubresource
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource
instance allocated on the specifiedMemoryStack
.int
mipLevel()
Returns the value of themipLevel
field.VkImageSubresource
mipLevel(int value)
Sets the specified value to themipLevel
field.static int
narrayLayer(long struct)
Unsafe version ofarrayLayer()
.static void
narrayLayer(long struct, int value)
Unsafe version ofarrayLayer
.static int
naspectMask(long struct)
Unsafe version ofaspectMask()
.static void
naspectMask(long struct, int value)
Unsafe version ofaspectMask
.static int
nmipLevel(long struct)
Unsafe version ofmipLevel()
.static void
nmipLevel(long struct, int value)
Unsafe version ofmipLevel
.VkImageSubresource
set(int aspectMask, int mipLevel, int arrayLayer)
Initializes this struct with the specified values.VkImageSubresource
set(VkImageSubresource src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
VkImageSubresource
public VkImageSubresource(java.nio.ByteBuffer container)
Creates aVkImageSubresource
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
-
aspectMask
public int aspectMask()
Returns the value of theaspectMask
field.
-
mipLevel
public int mipLevel()
Returns the value of themipLevel
field.
-
arrayLayer
public int arrayLayer()
Returns the value of thearrayLayer
field.
-
aspectMask
public VkImageSubresource aspectMask(int value)
Sets the specified value to theaspectMask
field.
-
mipLevel
public VkImageSubresource mipLevel(int value)
Sets the specified value to themipLevel
field.
-
arrayLayer
public VkImageSubresource arrayLayer(int value)
Sets the specified value to thearrayLayer
field.
-
set
public VkImageSubresource set(int aspectMask, int mipLevel, int arrayLayer)
Initializes this struct with the specified values.
-
set
public VkImageSubresource set(VkImageSubresource src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkImageSubresource malloc()
Returns a newVkImageSubresource
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageSubresource calloc()
Returns a newVkImageSubresource
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageSubresource create()
Returns a newVkImageSubresource
instance allocated withBufferUtils
.
-
create
public static VkImageSubresource create(long address)
Returns a newVkImageSubresource
instance for the specified memory address.
-
createSafe
@Nullable public static VkImageSubresource createSafe(long address)
-
malloc
public static VkImageSubresource.Buffer malloc(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageSubresource.Buffer calloc(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageSubresource.Buffer create(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageSubresource.Buffer create(long address, int capacity)
Create aVkImageSubresource.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkImageSubresource.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkImageSubresource mallocStack()
Returns a newVkImageSubresource
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageSubresource callocStack()
Returns a newVkImageSubresource
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageSubresource mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageSubresource callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkImageSubresource.Buffer mallocStack(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageSubresource.Buffer callocStack(int capacity)
Returns a newVkImageSubresource.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkImageSubresource.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkImageSubresource.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageSubresource.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
naspectMask
public static int naspectMask(long struct)
Unsafe version ofaspectMask()
.
-
nmipLevel
public static int nmipLevel(long struct)
Unsafe version ofmipLevel()
.
-
narrayLayer
public static int narrayLayer(long struct)
Unsafe version ofarrayLayer()
.
-
naspectMask
public static void naspectMask(long struct, int value)
Unsafe version ofaspectMask
.
-
nmipLevel
public static void nmipLevel(long struct, int value)
Unsafe version ofmipLevel
.
-
narrayLayer
public static void narrayLayer(long struct, int value)
Unsafe version ofarrayLayer
.
-
-