Class MeshoptVertexCacheStatistics

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<MeshoptVertexCacheStatistics>
org.lwjgl.util.meshoptimizer.MeshoptVertexCacheStatistics
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class MeshoptVertexCacheStatistics extends org.lwjgl.system.Struct<MeshoptVertexCacheStatistics> implements org.lwjgl.system.NativeResource

Layout


 struct meshopt_VertexCacheStatistics {
     unsigned int vertices_transformed;
     unsigned int warps_executed;
     float acmr();
     float atvr();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int VERTICES_TRANSFORMED
      The struct member offsets.
    • WARPS_EXECUTED

      public static final int WARPS_EXECUTED
      The struct member offsets.
    • ACMR

      public static final int ACMR
      The struct member offsets.
    • ATVR

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

    • MeshoptVertexCacheStatistics

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

      public int vertices_transformed()
      Returns:
      the value of the vertices_transformed field.
    • warps_executed

      public int warps_executed()
      Returns:
      the value of the warps_executed field.
    • acmr

      public float acmr()
      transformed vertices / triangle count; best case 0.5, worst case 3.0, optimum depends on topology
    • atvr

      public float atvr()
      transformed vertices / vertex count; best case 1.0, worst case 6.0, optimum is 1.0 (each vertex is transformed once)
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nvertices_transformed(long struct)
      Unsafe version of vertices_transformed().
    • nwarps_executed

      public static int nwarps_executed(long struct)
      Unsafe version of warps_executed().
    • nacmr

      public static float nacmr(long struct)
      Unsafe version of acmr().
    • natvr

      public static float natvr(long struct)
      Unsafe version of atvr().