Package org.lwjgl.bgfx
Class BGFXStats
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXStats
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class BGFXStats extends org.lwjgl.system.Struct
Renderer statistics data.All time values are high-resolution timestamps, while time frequencies define timestamps-per-second for that hardware.
Member documentation
cpuTimeFrame
– CPU time between twoframe
callscpuTimeBegin
– Render thread CPU submit begin timecpuTimeEnd
– Render thread CPU submit end timecpuTimerFreq
– CPU timer frequency. Timestamps-per-second.gpuTimeBegin
– GPU frame begin timegpuTimeEnd
– GPU frame end timegpuTimerFreq
– GPU timer frequencywaitRender
– time spent waiting for render backend thread to finish issuing draw commands to underlying graphics APIwaitSubmit
– time spent waiting for submit thread to advance to next framenumDraw
– number of draw calls submittednumCompute
– number of compute calls submittednumBlit
– number of blit calls submittedmaxGpuLatency
– GPU driver latencynumDynamicIndexBuffers
– number of used dynamic index buffersnumDynamicVertexBuffers
– number of used dynamic vertex buffersnumFrameBuffers
– number of used frame buffersnumIndexBuffers
– number of used index buffersnumOcclusionQueries
– number of used occlusion queriesnumPrograms
– number of used programsnumShaders
– number of used shadersnumTextures
– number of used texturesnumUniforms
– number of used uniformsnumVertexBuffers
– number of used vertex buffersnumVertexLayouts
– number of used vertex layoutstextureMemoryUsed
– estimate of texture memory usedrtMemoryUsed
– estimate of render target memory usedtransientVbUsed
– amount of transient vertex buffer usedtransientIbUsed
– amount of transient index buffer usednumPrims[BGFX_TOPOLOGY_COUNT]
– number of primitives renderedgpuMemoryMax
– maximum available GPU memory for applicationgpuMemoryUsed
– amount of GPU memory used by the applicationwidth
– backbuffer width in pixelsheight
– backbuffer height in pixelstextWidth
– debug text width in characterstextHeight
– debug text height in charactersnumViews
– number of view statsviewStats
– array of view statsnumEncoders
– number of encoders used during frameencoderStats
– array of encoder stats
Layout
struct bgfx_stats_t { int64_t cpuTimeFrame; int64_t cpuTimeBegin; int64_t cpuTimeEnd; int64_t cpuTimerFreq; int64_t gpuTimeBegin; int64_t gpuTimeEnd; int64_t gpuTimerFreq; int64_t waitRender; int64_t waitSubmit; uint32_t numDraw; uint32_t numCompute; uint32_t numBlit; uint32_t maxGpuLatency; uint16_t numDynamicIndexBuffers; uint16_t numDynamicVertexBuffers; uint16_t numFrameBuffers; uint16_t numIndexBuffers; uint16_t numOcclusionQueries; uint16_t numPrograms; uint16_t numShaders; uint16_t numTextures; uint16_t numUniforms; uint16_t numVertexBuffers; uint16_t numVertexLayouts; int64_t textureMemoryUsed; int64_t rtMemoryUsed; int32_t transientVbUsed; int32_t transientIbUsed; uint32_t numPrims[BGFX_TOPOLOGY_COUNT]; int64_t gpuMemoryMax; int64_t gpuMemoryUsed; uint16_t width; uint16_t height; uint16_t textWidth; uint16_t textHeight; uint16_t numViews;
bgfx_view_stats_t
* viewStats; uint16_t numEncoders;bgfx_encoder_stats_t
* encoderStats; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BGFXStats.Buffer
An array ofBGFXStats
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CPUTIMEBEGIN
CPUTIMEEND
CPUTIMEFRAME
CPUTIMERFREQ
ENCODERSTATS
GPUMEMORYMAX
GPUMEMORYUSED
GPUTIMEBEGIN
GPUTIMEEND
GPUTIMERFREQ
HEIGHT
MAXGPULATENCY
NUMBLIT
NUMCOMPUTE
NUMDRAW
NUMDYNAMICINDEXBUFFERS
NUMDYNAMICVERTEXBUFFERS
NUMENCODERS
NUMFRAMEBUFFERS
NUMINDEXBUFFERS
NUMOCCLUSIONQUERIES
NUMPRIMS
NUMPROGRAMS
NUMSHADERS
NUMTEXTURES
NUMUNIFORMS
NUMVERTEXBUFFERS
NUMVERTEXLAYOUTS
NUMVIEWS
RTMEMORYUSEDThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TEXTHEIGHT
TEXTUREMEMORYUSED
TEXTWIDTH
TRANSIENTIBUSED
TRANSIENTVBUSED
VIEWSTATS
WAITRENDER
WAITSUBMIT
WIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description BGFXStats(java.nio.ByteBuffer container)
Creates aBGFXStats
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
cpuTimeBegin()
Returns the value of thecpuTimeBegin
field.long
cpuTimeEnd()
Returns the value of thecpuTimeEnd
field.long
cpuTimeFrame()
Returns the value of thecpuTimeFrame
field.long
cpuTimerFreq()
Returns the value of thecpuTimerFreq
field.static BGFXStats
create(long address)
Returns a newBGFXStats
instance for the specified memory address.static BGFXStats.Buffer
create(long address, int capacity)
Create aBGFXStats.Buffer
instance at the specified memory.static BGFXStats
createSafe(long address)
static BGFXStats.Buffer
createSafe(long address, int capacity)
BGFXEncoderStats.Buffer
encoderStats()
Returns aBGFXEncoderStats.Buffer
view of the struct array pointed to by theencoderStats
field.long
gpuMemoryMax()
Returns the value of thegpuMemoryMax
field.long
gpuMemoryUsed()
Returns the value of thegpuMemoryUsed
field.long
gpuTimeBegin()
Returns the value of thegpuTimeBegin
field.long
gpuTimeEnd()
Returns the value of thegpuTimeEnd
field.long
gpuTimerFreq()
Returns the value of thegpuTimerFreq
field.short
height()
Returns the value of theheight
field.int
maxGpuLatency()
Returns the value of themaxGpuLatency
field.static long
ncpuTimeBegin(long struct)
Unsafe version ofcpuTimeBegin()
.static long
ncpuTimeEnd(long struct)
Unsafe version ofcpuTimeEnd()
.static long
ncpuTimeFrame(long struct)
Unsafe version ofcpuTimeFrame()
.static long
ncpuTimerFreq(long struct)
Unsafe version ofcpuTimerFreq()
.static BGFXEncoderStats.Buffer
nencoderStats(long struct)
Unsafe version ofencoderStats()
.static long
ngpuMemoryMax(long struct)
Unsafe version ofgpuMemoryMax()
.static long
ngpuMemoryUsed(long struct)
Unsafe version ofgpuMemoryUsed()
.static long
ngpuTimeBegin(long struct)
Unsafe version ofgpuTimeBegin()
.static long
ngpuTimeEnd(long struct)
Unsafe version ofgpuTimeEnd()
.static long
ngpuTimerFreq(long struct)
Unsafe version ofgpuTimerFreq()
.static short
nheight(long struct)
Unsafe version ofheight()
.static int
nmaxGpuLatency(long struct)
Unsafe version ofmaxGpuLatency()
.static int
nnumBlit(long struct)
Unsafe version ofnumBlit()
.static int
nnumCompute(long struct)
Unsafe version ofnumCompute()
.static int
nnumDraw(long struct)
Unsafe version ofnumDraw()
.static short
nnumDynamicIndexBuffers(long struct)
Unsafe version ofnumDynamicIndexBuffers()
.static short
nnumDynamicVertexBuffers(long struct)
Unsafe version ofnumDynamicVertexBuffers()
.static short
nnumEncoders(long struct)
Unsafe version ofnumEncoders()
.static short
nnumFrameBuffers(long struct)
Unsafe version ofnumFrameBuffers()
.static short
nnumIndexBuffers(long struct)
Unsafe version ofnumIndexBuffers()
.static short
nnumOcclusionQueries(long struct)
Unsafe version ofnumOcclusionQueries()
.static java.nio.IntBuffer
nnumPrims(long struct)
Unsafe version ofnumPrims()
.static int
nnumPrims(long struct, int index)
Unsafe version ofnumPrims
.static short
nnumPrograms(long struct)
Unsafe version ofnumPrograms()
.static short
nnumShaders(long struct)
Unsafe version ofnumShaders()
.static short
nnumTextures(long struct)
Unsafe version ofnumTextures()
.static short
nnumUniforms(long struct)
Unsafe version ofnumUniforms()
.static short
nnumVertexBuffers(long struct)
Unsafe version ofnumVertexBuffers()
.static short
nnumVertexLayouts(long struct)
Unsafe version ofnumVertexLayouts()
.static short
nnumViews(long struct)
Unsafe version ofnumViews()
.static long
nrtMemoryUsed(long struct)
Unsafe version ofrtMemoryUsed()
.static short
ntextHeight(long struct)
Unsafe version oftextHeight()
.static long
ntextureMemoryUsed(long struct)
Unsafe version oftextureMemoryUsed()
.static short
ntextWidth(long struct)
Unsafe version oftextWidth()
.static int
ntransientIbUsed(long struct)
Unsafe version oftransientIbUsed()
.static int
ntransientVbUsed(long struct)
Unsafe version oftransientVbUsed()
.int
numBlit()
Returns the value of thenumBlit
field.int
numCompute()
Returns the value of thenumCompute
field.int
numDraw()
Returns the value of thenumDraw
field.short
numDynamicIndexBuffers()
Returns the value of thenumDynamicIndexBuffers
field.short
numDynamicVertexBuffers()
Returns the value of thenumDynamicVertexBuffers
field.short
numEncoders()
Returns the value of thenumEncoders
field.short
numFrameBuffers()
Returns the value of thenumFrameBuffers
field.short
numIndexBuffers()
Returns the value of thenumIndexBuffers
field.short
numOcclusionQueries()
Returns the value of thenumOcclusionQueries
field.java.nio.IntBuffer
numPrims()
Returns aIntBuffer
view of thenumPrims
field.int
numPrims(int index)
Returns the value at the specified index of thenumPrims
field.short
numPrograms()
Returns the value of thenumPrograms
field.short
numShaders()
Returns the value of thenumShaders
field.short
numTextures()
Returns the value of thenumTextures
field.short
numUniforms()
Returns the value of thenumUniforms
field.short
numVertexBuffers()
Returns the value of thenumVertexBuffers
field.short
numVertexLayouts()
Returns the value of thenumVertexLayouts
field.short
numViews()
Returns the value of thenumViews
field.static BGFXViewStats.Buffer
nviewStats(long struct)
Unsafe version ofviewStats()
.static long
nwaitRender(long struct)
Unsafe version ofwaitRender()
.static long
nwaitSubmit(long struct)
Unsafe version ofwaitSubmit()
.static short
nwidth(long struct)
Unsafe version ofwidth()
.long
rtMemoryUsed()
Returns the value of thertMemoryUsed
field.int
sizeof()
short
textHeight()
Returns the value of thetextHeight
field.long
textureMemoryUsed()
Returns the value of thetextureMemoryUsed
field.short
textWidth()
Returns the value of thetextWidth
field.int
transientIbUsed()
Returns the value of thetransientIbUsed
field.int
transientVbUsed()
Returns the value of thetransientVbUsed
field.BGFXViewStats.Buffer
viewStats()
Returns aBGFXViewStats.Buffer
view of the struct array pointed to by theviewStats
field.long
waitRender()
Returns the value of thewaitRender
field.long
waitSubmit()
Returns the value of thewaitSubmit
field.short
width()
Returns the value of thewidth
field.
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
CPUTIMEFRAME, CPUTIMEBEGIN, CPUTIMEEND, CPUTIMERFREQ, GPUTIMEBEGIN, GPUTIMEEND, GPUTIMERFREQ, WAITRENDER, WAITSUBMIT, NUMDRAW, NUMCOMPUTE, NUMBLIT, MAXGPULATENCY, NUMDYNAMICINDEXBUFFERS, NUMDYNAMICVERTEXBUFFERS, NUMFRAMEBUFFERS, NUMINDEXBUFFERS, NUMOCCLUSIONQUERIES, NUMPROGRAMS, NUMSHADERS, NUMTEXTURES, NUMUNIFORMS, NUMVERTEXBUFFERS, NUMVERTEXLAYOUTS, TEXTUREMEMORYUSED, RTMEMORYUSED, TRANSIENTVBUSED, TRANSIENTIBUSED, NUMPRIMS, GPUMEMORYMAX, GPUMEMORYUSED, WIDTH, HEIGHT, TEXTWIDTH, TEXTHEIGHT, NUMVIEWS, VIEWSTATS, NUMENCODERS, ENCODERSTATS
The struct member offsets.
-
-
Constructor Detail
-
BGFXStats
public BGFXStats(java.nio.ByteBuffer container)
Creates aBGFXStats
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
cpuTimeFrame
public long cpuTimeFrame()
Returns the value of thecpuTimeFrame
field.
-
cpuTimeBegin
public long cpuTimeBegin()
Returns the value of thecpuTimeBegin
field.
-
cpuTimeEnd
public long cpuTimeEnd()
Returns the value of thecpuTimeEnd
field.
-
cpuTimerFreq
public long cpuTimerFreq()
Returns the value of thecpuTimerFreq
field.
-
gpuTimeBegin
public long gpuTimeBegin()
Returns the value of thegpuTimeBegin
field.
-
gpuTimeEnd
public long gpuTimeEnd()
Returns the value of thegpuTimeEnd
field.
-
gpuTimerFreq
public long gpuTimerFreq()
Returns the value of thegpuTimerFreq
field.
-
waitRender
public long waitRender()
Returns the value of thewaitRender
field.
-
waitSubmit
public long waitSubmit()
Returns the value of thewaitSubmit
field.
-
numDraw
public int numDraw()
Returns the value of thenumDraw
field.
-
numCompute
public int numCompute()
Returns the value of thenumCompute
field.
-
numBlit
public int numBlit()
Returns the value of thenumBlit
field.
-
maxGpuLatency
public int maxGpuLatency()
Returns the value of themaxGpuLatency
field.
-
numDynamicIndexBuffers
public short numDynamicIndexBuffers()
Returns the value of thenumDynamicIndexBuffers
field.
-
numDynamicVertexBuffers
public short numDynamicVertexBuffers()
Returns the value of thenumDynamicVertexBuffers
field.
-
numFrameBuffers
public short numFrameBuffers()
Returns the value of thenumFrameBuffers
field.
-
numIndexBuffers
public short numIndexBuffers()
Returns the value of thenumIndexBuffers
field.
-
numOcclusionQueries
public short numOcclusionQueries()
Returns the value of thenumOcclusionQueries
field.
-
numPrograms
public short numPrograms()
Returns the value of thenumPrograms
field.
-
numShaders
public short numShaders()
Returns the value of thenumShaders
field.
-
numTextures
public short numTextures()
Returns the value of thenumTextures
field.
-
numUniforms
public short numUniforms()
Returns the value of thenumUniforms
field.
-
numVertexBuffers
public short numVertexBuffers()
Returns the value of thenumVertexBuffers
field.
-
numVertexLayouts
public short numVertexLayouts()
Returns the value of thenumVertexLayouts
field.
-
textureMemoryUsed
public long textureMemoryUsed()
Returns the value of thetextureMemoryUsed
field.
-
rtMemoryUsed
public long rtMemoryUsed()
Returns the value of thertMemoryUsed
field.
-
transientVbUsed
public int transientVbUsed()
Returns the value of thetransientVbUsed
field.
-
transientIbUsed
public int transientIbUsed()
Returns the value of thetransientIbUsed
field.
-
numPrims
public java.nio.IntBuffer numPrims()
Returns aIntBuffer
view of thenumPrims
field.
-
numPrims
public int numPrims(int index)
Returns the value at the specified index of thenumPrims
field.
-
gpuMemoryMax
public long gpuMemoryMax()
Returns the value of thegpuMemoryMax
field.
-
gpuMemoryUsed
public long gpuMemoryUsed()
Returns the value of thegpuMemoryUsed
field.
-
width
public short width()
Returns the value of thewidth
field.
-
height
public short height()
Returns the value of theheight
field.
-
textWidth
public short textWidth()
Returns the value of thetextWidth
field.
-
textHeight
public short textHeight()
Returns the value of thetextHeight
field.
-
numViews
public short numViews()
Returns the value of thenumViews
field.
-
viewStats
public BGFXViewStats.Buffer viewStats()
Returns aBGFXViewStats.Buffer
view of the struct array pointed to by theviewStats
field.
-
numEncoders
public short numEncoders()
Returns the value of thenumEncoders
field.
-
encoderStats
public BGFXEncoderStats.Buffer encoderStats()
Returns aBGFXEncoderStats.Buffer
view of the struct array pointed to by theencoderStats
field.
-
create
public static BGFXStats create(long address)
Returns a newBGFXStats
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXStats createSafe(long address)
-
create
public static BGFXStats.Buffer create(long address, int capacity)
Create aBGFXStats.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static BGFXStats.Buffer createSafe(long address, int capacity)
-
ncpuTimeFrame
public static long ncpuTimeFrame(long struct)
Unsafe version ofcpuTimeFrame()
.
-
ncpuTimeBegin
public static long ncpuTimeBegin(long struct)
Unsafe version ofcpuTimeBegin()
.
-
ncpuTimeEnd
public static long ncpuTimeEnd(long struct)
Unsafe version ofcpuTimeEnd()
.
-
ncpuTimerFreq
public static long ncpuTimerFreq(long struct)
Unsafe version ofcpuTimerFreq()
.
-
ngpuTimeBegin
public static long ngpuTimeBegin(long struct)
Unsafe version ofgpuTimeBegin()
.
-
ngpuTimeEnd
public static long ngpuTimeEnd(long struct)
Unsafe version ofgpuTimeEnd()
.
-
ngpuTimerFreq
public static long ngpuTimerFreq(long struct)
Unsafe version ofgpuTimerFreq()
.
-
nwaitRender
public static long nwaitRender(long struct)
Unsafe version ofwaitRender()
.
-
nwaitSubmit
public static long nwaitSubmit(long struct)
Unsafe version ofwaitSubmit()
.
-
nnumDraw
public static int nnumDraw(long struct)
Unsafe version ofnumDraw()
.
-
nnumCompute
public static int nnumCompute(long struct)
Unsafe version ofnumCompute()
.
-
nnumBlit
public static int nnumBlit(long struct)
Unsafe version ofnumBlit()
.
-
nmaxGpuLatency
public static int nmaxGpuLatency(long struct)
Unsafe version ofmaxGpuLatency()
.
-
nnumDynamicIndexBuffers
public static short nnumDynamicIndexBuffers(long struct)
Unsafe version ofnumDynamicIndexBuffers()
.
-
nnumDynamicVertexBuffers
public static short nnumDynamicVertexBuffers(long struct)
Unsafe version ofnumDynamicVertexBuffers()
.
-
nnumFrameBuffers
public static short nnumFrameBuffers(long struct)
Unsafe version ofnumFrameBuffers()
.
-
nnumIndexBuffers
public static short nnumIndexBuffers(long struct)
Unsafe version ofnumIndexBuffers()
.
-
nnumOcclusionQueries
public static short nnumOcclusionQueries(long struct)
Unsafe version ofnumOcclusionQueries()
.
-
nnumPrograms
public static short nnumPrograms(long struct)
Unsafe version ofnumPrograms()
.
-
nnumShaders
public static short nnumShaders(long struct)
Unsafe version ofnumShaders()
.
-
nnumTextures
public static short nnumTextures(long struct)
Unsafe version ofnumTextures()
.
-
nnumUniforms
public static short nnumUniforms(long struct)
Unsafe version ofnumUniforms()
.
-
nnumVertexBuffers
public static short nnumVertexBuffers(long struct)
Unsafe version ofnumVertexBuffers()
.
-
nnumVertexLayouts
public static short nnumVertexLayouts(long struct)
Unsafe version ofnumVertexLayouts()
.
-
ntextureMemoryUsed
public static long ntextureMemoryUsed(long struct)
Unsafe version oftextureMemoryUsed()
.
-
nrtMemoryUsed
public static long nrtMemoryUsed(long struct)
Unsafe version ofrtMemoryUsed()
.
-
ntransientVbUsed
public static int ntransientVbUsed(long struct)
Unsafe version oftransientVbUsed()
.
-
ntransientIbUsed
public static int ntransientIbUsed(long struct)
Unsafe version oftransientIbUsed()
.
-
nnumPrims
public static java.nio.IntBuffer nnumPrims(long struct)
Unsafe version ofnumPrims()
.
-
nnumPrims
public static int nnumPrims(long struct, int index)
Unsafe version ofnumPrims
.
-
ngpuMemoryMax
public static long ngpuMemoryMax(long struct)
Unsafe version ofgpuMemoryMax()
.
-
ngpuMemoryUsed
public static long ngpuMemoryUsed(long struct)
Unsafe version ofgpuMemoryUsed()
.
-
nwidth
public static short nwidth(long struct)
Unsafe version ofwidth()
.
-
nheight
public static short nheight(long struct)
Unsafe version ofheight()
.
-
ntextWidth
public static short ntextWidth(long struct)
Unsafe version oftextWidth()
.
-
ntextHeight
public static short ntextHeight(long struct)
Unsafe version oftextHeight()
.
-
nnumViews
public static short nnumViews(long struct)
Unsafe version ofnumViews()
.
-
nviewStats
public static BGFXViewStats.Buffer nviewStats(long struct)
Unsafe version ofviewStats()
.
-
nnumEncoders
public static short nnumEncoders(long struct)
Unsafe version ofnumEncoders()
.
-
nencoderStats
public static BGFXEncoderStats.Buffer nencoderStats(long struct)
Unsafe version ofencoderStats()
.
-
-