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

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();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • DATAOFFSET

      public static final int DATAOFFSET
      The struct member offsets.
    • SUBDIVISIONLEVEL

      public static final int SUBDIVISIONLEVEL
      The struct member offsets.
    • FORMAT

      public static final int FORMAT
      The struct member offsets.
  • Constructor Details

    • VkMicromapTriangleEXT

      public VkMicromapTriangleEXT(ByteBuffer container)
      Creates a VkMicromapTriangleEXT instance at the current position of the specified ByteBuffer 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.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

      public VkMicromapTriangleEXT dataOffset(int value)
      Sets the specified value to the dataOffset() field.
    • subdivisionLevel

      public VkMicromapTriangleEXT subdivisionLevel(short value)
      Sets the specified value to the subdivisionLevel() field.
    • format

      public VkMicromapTriangleEXT format(short value)
      Sets the specified value to the format() field.
    • set

      public VkMicromapTriangleEXT set(int dataOffset, short subdivisionLevel, short format)
      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

      public static VkMicromapTriangleEXT malloc()
      Returns a new VkMicromapTriangleEXT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkMicromapTriangleEXT calloc()
      Returns a new VkMicromapTriangleEXT instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkMicromapTriangleEXT create()
      Returns a new VkMicromapTriangleEXT instance allocated with BufferUtils.
    • create

      public static VkMicromapTriangleEXT create(long address)
      Returns a new VkMicromapTriangleEXT instance for the specified memory address.
    • createSafe

      public static @Nullable VkMicromapTriangleEXT createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkMicromapTriangleEXT.Buffer malloc(int capacity)
      Returns a new VkMicromapTriangleEXT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkMicromapTriangleEXT.Buffer calloc(int capacity)
      Returns a new VkMicromapTriangleEXT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkMicromapTriangleEXT.Buffer create(int capacity)
      Returns a new VkMicromapTriangleEXT.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkMicromapTriangleEXT.Buffer create(long address, int capacity)
      Create a VkMicromapTriangleEXT.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VkMicromapTriangleEXT.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkMicromapTriangleEXT malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapTriangleEXT instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkMicromapTriangleEXT calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapTriangleEXT instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VkMicromapTriangleEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapTriangleEXT.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkMicromapTriangleEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapTriangleEXT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ndataOffset

      public static int ndataOffset(long struct)
      Unsafe version of dataOffset().
    • nsubdivisionLevel

      public static short nsubdivisionLevel(long struct)
      Unsafe version of subdivisionLevel().
    • nformat

      public static short nformat(long struct)
      Unsafe version of format().
    • ndataOffset

      public static void ndataOffset(long struct, int value)
      Unsafe version of dataOffset.
    • nsubdivisionLevel

      public static void nsubdivisionLevel(long struct, short value)
      Unsafe version of subdivisionLevel.
    • nformat

      public static void nformat(long struct, short value)
      Unsafe version of format.