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

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

    • SIZEOF

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

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

      public static final int COUNT
      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

    • VkMicromapUsageEXT

      public VkMicromapUsageEXT(ByteBuffer container)
      Creates a VkMicromapUsageEXT 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<VkMicromapUsageEXT>
    • count

      public int count()
      the number of triangles in the usage format defined by the subdivisionLevel and format below 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

      public VkMicromapUsageEXT count(int value)
      Sets the specified value to the count() field.
    • subdivisionLevel

      public VkMicromapUsageEXT subdivisionLevel(int value)
      Sets the specified value to the subdivisionLevel() field.
    • format

      public VkMicromapUsageEXT format(int value)
      Sets the specified value to the format() field.
    • set

      public VkMicromapUsageEXT set(int count, int subdivisionLevel, int 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 VkMicromapUsageEXT malloc()
      Returns a new VkMicromapUsageEXT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static VkMicromapUsageEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapUsageEXT.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
    • ncount

      public static int ncount(long struct)
      Unsafe version of count().
    • nsubdivisionLevel

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

      public static int nformat(long struct)
      Unsafe version of format().
    • ncount

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

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

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