Package org.lwjgl.vulkan
Class VkMicromapTriangleEXT
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkMicromapTriangleEXT>
org.lwjgl.vulkan.VkMicromapTriangleEXT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkMicromapTriangleEXT
extends org.lwjgl.system.Struct<VkMicromapTriangleEXT>
implements org.lwjgl.system.NativeResource
Structure specifying the micromap format and data for a triangle.
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.
Layout
struct VkMicromapTriangleEXT {
uint32_t dataOffset();
uint16_t subdivisionLevel();
uint16_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
ConstructorsConstructorDescriptionVkMicromapTriangleEXT(ByteBuffer container) Creates aVkMicromapTriangleEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkMicromapTriangleEXTcalloc()Returns a newVkMicromapTriangleEXTinstance allocated withmemCalloc.static VkMicromapTriangleEXT.Buffercalloc(int capacity) Returns a newVkMicromapTriangleEXT.Bufferinstance allocated withmemCalloc.static VkMicromapTriangleEXT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapTriangleEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMicromapTriangleEXTcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapTriangleEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMicromapTriangleEXTcreate()Returns a newVkMicromapTriangleEXTinstance allocated withBufferUtils.static VkMicromapTriangleEXT.Buffercreate(int capacity) Returns a newVkMicromapTriangleEXT.Bufferinstance allocated withBufferUtils.static VkMicromapTriangleEXTcreate(long address) Returns a newVkMicromapTriangleEXTinstance for the specified memory address.static VkMicromapTriangleEXT.Buffercreate(long address, int capacity) Create aVkMicromapTriangleEXT.Bufferinstance at the specified memory.static @Nullable VkMicromapTriangleEXTcreateSafe(long address) static @Nullable VkMicromapTriangleEXT.BuffercreateSafe(long address, int capacity) intthe offset in bytes of the start of the data for this triangle.dataOffset(int value) Sets the specified value to thedataOffset()field.shortformat()the format of this triangleformat(short value) Sets the specified value to theformat()field.static VkMicromapTriangleEXTmalloc()Returns a newVkMicromapTriangleEXTinstance allocated withmemAlloc.static VkMicromapTriangleEXT.Buffermalloc(int capacity) Returns a newVkMicromapTriangleEXT.Bufferinstance allocated withmemAlloc.static VkMicromapTriangleEXT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapTriangleEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkMicromapTriangleEXTmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkMicromapTriangleEXTinstance allocated on the specifiedMemoryStack.static intndataOffset(long struct) Unsafe version ofdataOffset().static voidndataOffset(long struct, int value) Unsafe version ofdataOffset.static shortnformat(long struct) Unsafe version offormat().static voidnformat(long struct, short value) Unsafe version offormat.static shortnsubdivisionLevel(long struct) Unsafe version ofsubdivisionLevel().static voidnsubdivisionLevel(long struct, short value) Unsafe version ofsubdivisionLevel.set(int dataOffset, short subdivisionLevel, short format) Initializes this struct with the specified values.set(VkMicromapTriangleEXT src) Copies the specified struct data to this struct.intsizeof()shortthe subdivision level of this trianglesubdivisionLevel(short 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. -
DATAOFFSET
public static final int DATAOFFSETThe struct member offsets. -
SUBDIVISIONLEVEL
public static final int SUBDIVISIONLEVELThe struct member offsets. -
FORMAT
public static final int FORMATThe struct member offsets.
-
-
Constructor Details
-
VkMicromapTriangleEXT
Creates aVkMicromapTriangleEXTinstance 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<VkMicromapTriangleEXT>
-
dataOffset
public int dataOffset()the offset in bytes of the start of the data for this triangle. This is a byte aligned value. -
subdivisionLevel
public short subdivisionLevel()the subdivision level of this triangle -
format
public short format()the format of this triangle -
dataOffset
Sets the specified value to thedataOffset()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 newVkMicromapTriangleEXTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkMicromapTriangleEXTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkMicromapTriangleEXTinstance allocated withBufferUtils. -
create
Returns a newVkMicromapTriangleEXTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkMicromapTriangleEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkMicromapTriangleEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkMicromapTriangleEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkMicromapTriangleEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkMicromapTriangleEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkMicromapTriangleEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkMicromapTriangleEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkMicromapTriangleEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ndataOffset
public static int ndataOffset(long struct) Unsafe version ofdataOffset(). -
nsubdivisionLevel
public static short nsubdivisionLevel(long struct) Unsafe version ofsubdivisionLevel(). -
nformat
public static short nformat(long struct) Unsafe version offormat(). -
ndataOffset
public static void ndataOffset(long struct, int value) Unsafe version ofdataOffset. -
nsubdivisionLevel
public static void nsubdivisionLevel(long struct, short value) Unsafe version ofsubdivisionLevel. -
nformat
public static void nformat(long struct, short value) Unsafe version offormat.
-