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, NativeResource, Pointer
public class VkImageSubresource extends Struct
Khronos Reference Page
Vulkan SpecificationSelects a specific image of an image subresource (mipLevel/arrayLayer) of an image created with linear tiling.
Valid Usage
aspectMaskmust be a valid combination ofVkImageAspectFlagBitsvaluesaspectMaskmust not be 0mipLevelmust be less than themipLevelsspecified inVkImageCreateInfowhen the image was createdarrayLayermust be less than thearrayLayersspecified inVkImageCreateInfowhen the image was created
Member documentation
aspectMask– aVkImageAspectFlagsselecting the image aspect. One or more of:IMAGE_ASPECT_COLOR_BITIMAGE_ASPECT_DEPTH_BITIMAGE_ASPECT_METADATA_BITIMAGE_ASPECT_STENCIL_BITmipLevel– selects the mipmap levelarrayLayer– selects the array layer
Layout
struct VkImageSubresource { VkImageAspectFlags aspectMask; uint32_t mipLevel; uint32_t arrayLayer; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkImageSubresource.BufferAn array ofVkImageSubresourcestructs.-
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 VkImageSubresource(java.nio.ByteBuffer container)Creates aVkImageSubresourceinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intarrayLayer()Returns the value of thearrayLayerfield.VkImageSubresourcearrayLayer(int value)Sets the specified value to thearrayLayerfield.intaspectMask()Returns the value of theaspectMaskfield.VkImageSubresourceaspectMask(int value)Sets the specified value to theaspectMaskfield.static VkImageSubresourcecalloc()Returns a newVkImageSubresourceinstance allocated withmemCalloc.static VkImageSubresource.Buffercalloc(int capacity)Returns a newVkImageSubresource.Bufferinstance allocated withmemCalloc.static VkImageSubresourcecallocStack()Returns a newVkImageSubresourceinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageSubresource.BuffercallocStack(int capacity)Returns a newVkImageSubresource.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageSubresource.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkImageSubresource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageSubresourcecallocStack(MemoryStack stack)Returns a newVkImageSubresourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageSubresourcecreate()Returns a newVkImageSubresourceinstance allocated withBufferUtils.static VkImageSubresource.Buffercreate(int capacity)Returns a newVkImageSubresource.Bufferinstance allocated withBufferUtils.static VkImageSubresourcecreate(long address)Returns a newVkImageSubresourceinstance for the specified memory address ornullif the address isNULL.static VkImageSubresource.Buffercreate(long address, int capacity)Create aVkImageSubresource.Bufferinstance at the specified memory.static VkImageSubresourcemalloc()Returns a newVkImageSubresourceinstance allocated withmemAlloc.static VkImageSubresource.Buffermalloc(int capacity)Returns a newVkImageSubresource.Bufferinstance allocated withmemAlloc.static VkImageSubresourcemallocStack()Returns a newVkImageSubresourceinstance allocated on the thread-localMemoryStack.static VkImageSubresource.BuffermallocStack(int capacity)Returns a newVkImageSubresource.Bufferinstance allocated on the thread-localMemoryStack.static VkImageSubresource.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkImageSubresource.Bufferinstance allocated on the specifiedMemoryStack.static VkImageSubresourcemallocStack(MemoryStack stack)Returns a newVkImageSubresourceinstance allocated on the specifiedMemoryStack.intmipLevel()Returns the value of themipLevelfield.VkImageSubresourcemipLevel(int value)Sets the specified value to themipLevelfield.VkImageSubresourcenset(long struct)Unsafe version ofset.VkImageSubresourceset(int aspectMask, int mipLevel, int arrayLayer)Initializes this struct with the specified values.VkImageSubresourceset(VkImageSubresource src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkImageSubresource
public VkImageSubresource(java.nio.ByteBuffer container)
Creates aVkImageSubresourceinstance 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).
-
aspectMask
public int aspectMask()
Returns the value of theaspectMaskfield.
-
mipLevel
public int mipLevel()
Returns the value of themipLevelfield.
-
arrayLayer
public int arrayLayer()
Returns the value of thearrayLayerfield.
-
aspectMask
public VkImageSubresource aspectMask(int value)
Sets the specified value to theaspectMaskfield.
-
mipLevel
public VkImageSubresource mipLevel(int value)
Sets the specified value to themipLevelfield.
-
arrayLayer
public VkImageSubresource arrayLayer(int value)
Sets the specified value to thearrayLayerfield.
-
set
public VkImageSubresource set(int aspectMask, int mipLevel, int arrayLayer)
Initializes this struct with the specified values.
-
nset
public VkImageSubresource nset(long struct)
Unsafe version ofset.
-
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 newVkImageSubresourceinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkImageSubresource calloc()
Returns a newVkImageSubresourceinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkImageSubresource create()
Returns a newVkImageSubresourceinstance allocated withBufferUtils.
-
create
public static VkImageSubresource create(long address)
Returns a newVkImageSubresourceinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkImageSubresource.Buffer malloc(int capacity)
Returns a newVkImageSubresource.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkImageSubresource.Buffer calloc(int capacity)
Returns a newVkImageSubresource.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageSubresource.Buffer create(int capacity)
Returns a newVkImageSubresource.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageSubresource.Buffer create(long address, int capacity)
Create aVkImageSubresource.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkImageSubresource mallocStack()
Returns a newVkImageSubresourceinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkImageSubresource callocStack()
Returns a newVkImageSubresourceinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkImageSubresource mallocStack(MemoryStack stack)
Returns a newVkImageSubresourceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkImageSubresource callocStack(MemoryStack stack)
Returns a newVkImageSubresourceinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkImageSubresource.Buffer callocStack(int capacity)
Returns a newVkImageSubresource.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkImageSubresource.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageSubresource.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkImageSubresource.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkImageSubresource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-