Package org.lwjgl.util.meshoptimizer
Class MeshoptOverdrawStatistics
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.meshoptimizer.MeshoptOverdrawStatistics
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class MeshoptOverdrawStatistics extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct meshopt_OverdrawStatistics { unsigned int pixels_covered; unsigned int pixels_shaded; floatoverdraw(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMeshoptOverdrawStatistics.BufferAn array ofMeshoptOverdrawStatisticsstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intOVERDRAW
PIXELS_COVERED
PIXELS_SHADEDThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description MeshoptOverdrawStatistics(java.nio.ByteBuffer container)Creates aMeshoptOverdrawStatisticsinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MeshoptOverdrawStatisticscalloc()Returns a newMeshoptOverdrawStatisticsinstance allocated withmemCalloc.static MeshoptOverdrawStatistics.Buffercalloc(int capacity)Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated withmemCalloc.static MeshoptOverdrawStatistics.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MeshoptOverdrawStatisticscalloc(org.lwjgl.system.MemoryStack stack)Returns a newMeshoptOverdrawStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MeshoptOverdrawStatisticscreate()Returns a newMeshoptOverdrawStatisticsinstance allocated withBufferUtils.static MeshoptOverdrawStatistics.Buffercreate(int capacity)Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated withBufferUtils.static MeshoptOverdrawStatisticscreate(long address)Returns a newMeshoptOverdrawStatisticsinstance for the specified memory address.static MeshoptOverdrawStatistics.Buffercreate(long address, int capacity)Create aMeshoptOverdrawStatistics.Bufferinstance at the specified memory.static MeshoptOverdrawStatisticscreateSafe(long address)static MeshoptOverdrawStatistics.BuffercreateSafe(long address, int capacity)static MeshoptOverdrawStatisticsmalloc()Returns a newMeshoptOverdrawStatisticsinstance allocated withmemAlloc.static MeshoptOverdrawStatistics.Buffermalloc(int capacity)Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated withmemAlloc.static MeshoptOverdrawStatistics.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated on the specifiedMemoryStack.static MeshoptOverdrawStatisticsmalloc(org.lwjgl.system.MemoryStack stack)Returns a newMeshoptOverdrawStatisticsinstance allocated on the specifiedMemoryStack.static floatnoverdraw(long struct)Unsafe version ofoverdraw().static intnpixels_covered(long struct)Unsafe version ofpixels_covered().static intnpixels_shaded(long struct)Unsafe version ofpixels_shaded().floatoverdraw()shaded pixels / covered pixels; best case 1.0intpixels_covered()intpixels_shaded()intsizeof()
-
-
-
Constructor Detail
-
MeshoptOverdrawStatistics
public MeshoptOverdrawStatistics(java.nio.ByteBuffer container)
Creates aMeshoptOverdrawStatisticsinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
pixels_covered
public int pixels_covered()
- Returns:
- the value of the
pixels_coveredfield.
-
pixels_shaded
public int pixels_shaded()
- Returns:
- the value of the
pixels_shadedfield.
-
overdraw
public float overdraw()
shaded pixels / covered pixels; best case 1.0
-
malloc
public static MeshoptOverdrawStatistics malloc()
Returns a newMeshoptOverdrawStatisticsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static MeshoptOverdrawStatistics calloc()
Returns a newMeshoptOverdrawStatisticsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static MeshoptOverdrawStatistics create()
Returns a newMeshoptOverdrawStatisticsinstance allocated withBufferUtils.
-
create
public static MeshoptOverdrawStatistics create(long address)
Returns a newMeshoptOverdrawStatisticsinstance for the specified memory address.
-
createSafe
@Nullable public static MeshoptOverdrawStatistics createSafe(long address)
-
malloc
public static MeshoptOverdrawStatistics.Buffer malloc(int capacity)
Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static MeshoptOverdrawStatistics.Buffer calloc(int capacity)
Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static MeshoptOverdrawStatistics.Buffer create(int capacity)
Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static MeshoptOverdrawStatistics.Buffer create(long address, int capacity)
Create aMeshoptOverdrawStatistics.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static MeshoptOverdrawStatistics.Buffer createSafe(long address, int capacity)
-
malloc
public static MeshoptOverdrawStatistics malloc(org.lwjgl.system.MemoryStack stack)
Returns a newMeshoptOverdrawStatisticsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static MeshoptOverdrawStatistics calloc(org.lwjgl.system.MemoryStack stack)
Returns a newMeshoptOverdrawStatisticsinstance allocated on the specifiedMemoryStackand 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 newMeshoptOverdrawStatistics.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static MeshoptOverdrawStatistics.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMeshoptOverdrawStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
npixels_covered
public static int npixels_covered(long struct)
Unsafe version ofpixels_covered().
-
npixels_shaded
public static int npixels_shaded(long struct)
Unsafe version ofpixels_shaded().
-
noverdraw
public static float noverdraw(long struct)
Unsafe version ofoverdraw().
-
-