Package org.lwjgl.vulkan
Class VkImageSubresourceRange
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageSubresourceRange
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkImageSubresourceRange extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes a range of mipmap levels, array layers, and aspects.
Valid Usage
aspectMask
must be a valid combination ofVkImageAspectFlagBits
valuesaspectMask
must not be 0- If
levelCount
is notREMAINING_MIP_LEVELS
,baseMipLevel + levelCount
must be less than or equal to themipLevels
specified inVkImageCreateInfo
when the image was created - If
layerCount
is notREMAINING_ARRAY_LAYERS
,baseArrayLayer + layerCount
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
when the image was created
Member documentation
aspectMask
– a bitmask indicating which aspect(s) of the image are included in the view. One or more of:IMAGE_ASPECT_COLOR_BIT
IMAGE_ASPECT_DEPTH_BIT
IMAGE_ASPECT_METADATA_BIT
IMAGE_ASPECT_STENCIL_BIT
baseMipLevel
– the first mipmap level accessible to the viewlevelCount
– the number of mipmap levels (starting frombaseMipLevel
) accessible to the viewbaseArrayLayer
– the first array layer accessible to the viewlayerCount
– the number of array layers (starting frombaseArrayLayer
) accessible to the view
Layout
struct VkImageSubresourceRange { VkImageAspectFlags aspectMask; uint32_t baseMipLevel; uint32_t levelCount; uint32_t baseArrayLayer; uint32_t layerCount; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkImageSubresourceRange.Buffer
An array ofVkImageSubresourceRange
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 VkImageSubresourceRange(java.nio.ByteBuffer container)
Creates aVkImageSubresourceRange
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 int
aspectMask()
Returns the value of theaspectMask
field.VkImageSubresourceRange
aspectMask(int value)
Sets the specified value to theaspectMask
field.int
baseArrayLayer()
Returns the value of thebaseArrayLayer
field.VkImageSubresourceRange
baseArrayLayer(int value)
Sets the specified value to thebaseArrayLayer
field.int
baseMipLevel()
Returns the value of thebaseMipLevel
field.VkImageSubresourceRange
baseMipLevel(int value)
Sets the specified value to thebaseMipLevel
field.static VkImageSubresourceRange
calloc()
Returns a newVkImageSubresourceRange
instance allocated withmemCalloc
.static VkImageSubresourceRange.Buffer
calloc(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated withmemCalloc
.static VkImageSubresourceRange
callocStack()
Returns a newVkImageSubresourceRange
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageSubresourceRange.Buffer
callocStack(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageSubresourceRange.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageSubresourceRange
callocStack(MemoryStack stack)
Returns a newVkImageSubresourceRange
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageSubresourceRange
create()
Returns a newVkImageSubresourceRange
instance allocated withBufferUtils
.static VkImageSubresourceRange.Buffer
create(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated withBufferUtils
.static VkImageSubresourceRange
create(long address)
Returns a newVkImageSubresourceRange
instance for the specified memory address ornull
if the address isNULL
.static VkImageSubresourceRange.Buffer
create(long address, int capacity)
Create aVkImageSubresourceRange.Buffer
instance at the specified memory.int
layerCount()
Returns the value of thelayerCount
field.VkImageSubresourceRange
layerCount(int value)
Sets the specified value to thelayerCount
field.int
levelCount()
Returns the value of thelevelCount
field.VkImageSubresourceRange
levelCount(int value)
Sets the specified value to thelevelCount
field.static VkImageSubresourceRange
malloc()
Returns a newVkImageSubresourceRange
instance allocated withmemAlloc
.static VkImageSubresourceRange.Buffer
malloc(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated withmemAlloc
.static VkImageSubresourceRange
mallocStack()
Returns a newVkImageSubresourceRange
instance allocated on the thread-localMemoryStack
.static VkImageSubresourceRange.Buffer
mallocStack(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageSubresourceRange.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageSubresourceRange
mallocStack(MemoryStack stack)
Returns a newVkImageSubresourceRange
instance allocated on the specifiedMemoryStack
.VkImageSubresourceRange
nset(long struct)
Unsafe version ofset
.VkImageSubresourceRange
set(int aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
Initializes this struct with the specified values.VkImageSubresourceRange
set(VkImageSubresourceRange src)
Copies the specified struct data to this struct.int
sizeof()
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
-
VkImageSubresourceRange
public VkImageSubresourceRange(java.nio.ByteBuffer container)
Creates aVkImageSubresourceRange
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)
.
-
aspectMask
public int aspectMask()
Returns the value of theaspectMask
field.
-
baseMipLevel
public int baseMipLevel()
Returns the value of thebaseMipLevel
field.
-
levelCount
public int levelCount()
Returns the value of thelevelCount
field.
-
baseArrayLayer
public int baseArrayLayer()
Returns the value of thebaseArrayLayer
field.
-
layerCount
public int layerCount()
Returns the value of thelayerCount
field.
-
aspectMask
public VkImageSubresourceRange aspectMask(int value)
Sets the specified value to theaspectMask
field.
-
baseMipLevel
public VkImageSubresourceRange baseMipLevel(int value)
Sets the specified value to thebaseMipLevel
field.
-
levelCount
public VkImageSubresourceRange levelCount(int value)
Sets the specified value to thelevelCount
field.
-
baseArrayLayer
public VkImageSubresourceRange baseArrayLayer(int value)
Sets the specified value to thebaseArrayLayer
field.
-
layerCount
public VkImageSubresourceRange layerCount(int value)
Sets the specified value to thelayerCount
field.
-
set
public VkImageSubresourceRange set(int aspectMask, int baseMipLevel, int levelCount, int baseArrayLayer, int layerCount)
Initializes this struct with the specified values.
-
nset
public VkImageSubresourceRange nset(long struct)
Unsafe version ofset
.
-
set
public VkImageSubresourceRange set(VkImageSubresourceRange src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkImageSubresourceRange malloc()
Returns a newVkImageSubresourceRange
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageSubresourceRange calloc()
Returns a newVkImageSubresourceRange
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageSubresourceRange create()
Returns a newVkImageSubresourceRange
instance allocated withBufferUtils
.
-
create
public static VkImageSubresourceRange create(long address)
Returns a newVkImageSubresourceRange
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkImageSubresourceRange.Buffer malloc(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageSubresourceRange.Buffer calloc(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageSubresourceRange.Buffer create(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageSubresourceRange.Buffer create(long address, int capacity)
Create aVkImageSubresourceRange.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkImageSubresourceRange mallocStack()
Returns a newVkImageSubresourceRange
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageSubresourceRange callocStack()
Returns a newVkImageSubresourceRange
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageSubresourceRange mallocStack(MemoryStack stack)
Returns a newVkImageSubresourceRange
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageSubresourceRange callocStack(MemoryStack stack)
Returns a newVkImageSubresourceRange
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkImageSubresourceRange.Buffer mallocStack(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageSubresourceRange.Buffer callocStack(int capacity)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkImageSubresourceRange.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkImageSubresourceRange.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkImageSubresourceRange.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-