Class MeshoptMeshlet

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class MeshoptMeshlet
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Experimental: Meshlet

    Layout

    
     struct meshopt_Meshlet {
         unsigned int vertex_offset();
         unsigned int triangle_offset();
         unsigned int vertex_count();
         unsigned int triangle_count();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • VERTEX_OFFSET, TRIANGLE_OFFSET, VERTEX_COUNT, TRIANGLE_COUNT

        The struct member offsets.
    • Constructor Detail

      • MeshoptMeshlet

        public MeshoptMeshlet​(java.nio.ByteBuffer container)
        Creates a MeshoptMeshlet 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • vertex_offset

        public int vertex_offset()
        offset within meshlet_vertices array with meshlet data
      • triangle_offset

        public int triangle_offset()
        offset within meshlet_triangles array with meshlet data
      • vertex_count

        public int vertex_count()
        number of vertices used in the meshlet; data is stored in consecutive range defined by offset and count
      • triangle_count

        public int triangle_count()
        number of triangles used in the meshlet; data is stored in consecutive range defined by offset and count
      • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static int nvertex_offset​(long struct)
        Unsafe version of vertex_offset().
      • ntriangle_offset

        public static int ntriangle_offset​(long struct)
        Unsafe version of triangle_offset().
      • nvertex_count

        public static int nvertex_count​(long struct)
        Unsafe version of vertex_count().
      • ntriangle_count

        public static int ntriangle_count​(long struct)
        Unsafe version of triangle_count().