Package org.lwjgl.vulkan
Class VkMicromapUsageEXT
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkMicromapUsageEXT>
org.lwjgl.vulkan.VkMicromapUsageEXT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkMicromapUsageEXT
extends org.lwjgl.system.Struct<VkMicromapUsageEXT>
implements org.lwjgl.system.NativeResource
Structure specifying the usage information used to build a micromap.
Valid Usage
- If the
VkMicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTthenformatmust beOPACITY_MICROMAP_FORMAT_2_STATE_EXTorOPACITY_MICROMAP_FORMAT_4_STATE_EXT - If the
VkMicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTandformatisOPACITY_MICROMAP_FORMAT_2_STATE_EXTthensubdivisionLevelmust be less than or equal toVkPhysicalDeviceOpacityMicromapPropertiesEXT::maxOpacity2StateSubdivisionLevel - If the
VkMicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTandformatisOPACITY_MICROMAP_FORMAT_4_STATE_EXTthensubdivisionLevelmust be less than or equal toVkPhysicalDeviceOpacityMicromapPropertiesEXT::maxOpacity4StateSubdivisionLevel - If the
VkMicromapTypeEXTof the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVthenformatmust beDISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV,DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NVorDISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV - If the
VkMicromapTypeEXTof the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVthensubdivisionLevelmust be less than or equal toVkPhysicalDeviceDisplacementMicromapPropertiesNV::maxDisplacementMicromapSubdivisionLevel
The format is interpreted based on the type of the micromap using it.
See Also
VkAccelerationStructureTrianglesDisplacementMicromapNV, VkAccelerationStructureTrianglesOpacityMicromapEXT, VkMicromapBuildInfoEXT
Layout
struct VkMicromapUsageEXT {
uint32_t count();
uint32_t subdivisionLevel();
uint32_t format();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkMicromapUsageEXT(ByteBuffer container) Creates aVkMicromapUsageEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkMicromapUsageEXTcalloc()Returns a newVkMicromapUsageEXTinstance allocated withmemCalloc.static VkMicromapUsageEXT.Buffercalloc(int capacity) Returns a newVkMicromapUsageEXT.Bufferinstance allocated withmemCalloc.static VkMicromapUsageEXT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapUsageEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMicromapUsageEXTcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapUsageEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcount()the number of triangles in the usage format defined by thesubdivisionLevelandformatbelow in the micromapcount(int value) Sets the specified value to thecount()field.static VkMicromapUsageEXTcreate()Returns a newVkMicromapUsageEXTinstance allocated withBufferUtils.static VkMicromapUsageEXT.Buffercreate(int capacity) Returns a newVkMicromapUsageEXT.Bufferinstance allocated withBufferUtils.static VkMicromapUsageEXTcreate(long address) Returns a newVkMicromapUsageEXTinstance for the specified memory address.static VkMicromapUsageEXT.Buffercreate(long address, int capacity) Create aVkMicromapUsageEXT.Bufferinstance at the specified memory.static @Nullable VkMicromapUsageEXTcreateSafe(long address) static @Nullable VkMicromapUsageEXT.BuffercreateSafe(long address, int capacity) intformat()the format of this usage formatformat(int value) Sets the specified value to theformat()field.static VkMicromapUsageEXTmalloc()Returns a newVkMicromapUsageEXTinstance allocated withmemAlloc.static VkMicromapUsageEXT.Buffermalloc(int capacity) Returns a newVkMicromapUsageEXT.Bufferinstance allocated withmemAlloc.static VkMicromapUsageEXT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapUsageEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkMicromapUsageEXTmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapUsageEXTinstance allocated on the specifiedMemoryStack.static intncount(long struct) Unsafe version ofcount().static voidncount(long struct, int value) Unsafe version ofcount.static intnformat(long struct) Unsafe version offormat().static voidnformat(long struct, int value) Unsafe version offormat.static intnsubdivisionLevel(long struct) Unsafe version ofsubdivisionLevel().static voidnsubdivisionLevel(long struct, int value) Unsafe version ofsubdivisionLevel.set(int count, int subdivisionLevel, int format) Initializes this struct with the specified values.set(VkMicromapUsageEXT src) Copies the specified struct data to this struct.intsizeof()intthe subdivision level of this usage formatsubdivisionLevel(int value) Sets the specified value to thesubdivisionLevel()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
COUNT
public static final int COUNTThe struct member offsets. -
SUBDIVISIONLEVEL
public static final int SUBDIVISIONLEVELThe struct member offsets. -
FORMAT
public static final int FORMATThe struct member offsets.
-
-
Constructor Details
-
VkMicromapUsageEXT
Creates aVkMicromapUsageEXTinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkMicromapUsageEXT>
-
count
public int count()the number of triangles in the usage format defined by thesubdivisionLevelandformatbelow in the micromap -
subdivisionLevel
public int subdivisionLevel()the subdivision level of this usage format -
format
public int format()the format of this usage format -
count
Sets the specified value to thecount()field. -
subdivisionLevel
Sets the specified value to thesubdivisionLevel()field. -
format
Sets the specified value to theformat()field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkMicromapUsageEXTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkMicromapUsageEXTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkMicromapUsageEXTinstance allocated withBufferUtils. -
create
Returns a newVkMicromapUsageEXTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkMicromapUsageEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkMicromapUsageEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkMicromapUsageEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkMicromapUsageEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkMicromapUsageEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkMicromapUsageEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkMicromapUsageEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkMicromapUsageEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ncount
public static int ncount(long struct) Unsafe version ofcount(). -
nsubdivisionLevel
public static int nsubdivisionLevel(long struct) Unsafe version ofsubdivisionLevel(). -
nformat
public static int nformat(long struct) Unsafe version offormat(). -
ncount
public static void ncount(long struct, int value) Unsafe version ofcount. -
nsubdivisionLevel
public static void nsubdivisionLevel(long struct, int value) Unsafe version ofsubdivisionLevel. -
nformat
public static void nformat(long struct, int value) Unsafe version offormat.
-