Class MeshoptOverdrawStatistics

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

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

Layout


 struct meshopt_OverdrawStatistics {
     unsigned int pixels_covered;
     unsigned int pixels_shaded;
     float overdraw();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int PIXELS_COVERED
      The struct member offsets.
    • PIXELS_SHADED

      public static final int PIXELS_SHADED
      The struct member offsets.
    • OVERDRAW

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

    • MeshoptOverdrawStatistics

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

      public int pixels_covered()
      Returns:
      the value of the pixels_covered field.
    • pixels_shaded

      public int pixels_shaded()
      Returns:
      the value of the pixels_shaded field.
    • overdraw

      public float overdraw()
      shaded pixels / covered pixels; best case 1.0
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int npixels_covered(long struct)
      Unsafe version of pixels_covered().
    • npixels_shaded

      public static int npixels_shaded(long struct)
      Unsafe version of pixels_shaded().
    • noverdraw

      public static float noverdraw(long struct)
      Unsafe version of overdraw().