Class BGFXStats

All Implemented Interfaces:
Pointer

public class BGFXStats extends Struct<BGFXStats>
Renderer statistics data.

All time values are high-resolution timestamps, while time frequencies define timestamps-per-second for that hardware.

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();
     uint32_t gpuFrameNum();
     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();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int CPUTIMEFRAME
      The struct member offsets.
    • CPUTIMEBEGIN

      public static final int CPUTIMEBEGIN
      The struct member offsets.
    • CPUTIMEEND

      public static final int CPUTIMEEND
      The struct member offsets.
    • CPUTIMERFREQ

      public static final int CPUTIMERFREQ
      The struct member offsets.
    • GPUTIMEBEGIN

      public static final int GPUTIMEBEGIN
      The struct member offsets.
    • GPUTIMEEND

      public static final int GPUTIMEEND
      The struct member offsets.
    • GPUTIMERFREQ

      public static final int GPUTIMERFREQ
      The struct member offsets.
    • WAITRENDER

      public static final int WAITRENDER
      The struct member offsets.
    • WAITSUBMIT

      public static final int WAITSUBMIT
      The struct member offsets.
    • NUMDRAW

      public static final int NUMDRAW
      The struct member offsets.
    • NUMCOMPUTE

      public static final int NUMCOMPUTE
      The struct member offsets.
    • NUMBLIT

      public static final int NUMBLIT
      The struct member offsets.
    • MAXGPULATENCY

      public static final int MAXGPULATENCY
      The struct member offsets.
    • GPUFRAMENUM

      public static final int GPUFRAMENUM
      The struct member offsets.
    • NUMDYNAMICINDEXBUFFERS

      public static final int NUMDYNAMICINDEXBUFFERS
      The struct member offsets.
    • NUMDYNAMICVERTEXBUFFERS

      public static final int NUMDYNAMICVERTEXBUFFERS
      The struct member offsets.
    • NUMFRAMEBUFFERS

      public static final int NUMFRAMEBUFFERS
      The struct member offsets.
    • NUMINDEXBUFFERS

      public static final int NUMINDEXBUFFERS
      The struct member offsets.
    • NUMOCCLUSIONQUERIES

      public static final int NUMOCCLUSIONQUERIES
      The struct member offsets.
    • NUMPROGRAMS

      public static final int NUMPROGRAMS
      The struct member offsets.
    • NUMSHADERS

      public static final int NUMSHADERS
      The struct member offsets.
    • NUMTEXTURES

      public static final int NUMTEXTURES
      The struct member offsets.
    • NUMUNIFORMS

      public static final int NUMUNIFORMS
      The struct member offsets.
    • NUMVERTEXBUFFERS

      public static final int NUMVERTEXBUFFERS
      The struct member offsets.
    • NUMVERTEXLAYOUTS

      public static final int NUMVERTEXLAYOUTS
      The struct member offsets.
    • TEXTUREMEMORYUSED

      public static final int TEXTUREMEMORYUSED
      The struct member offsets.
    • RTMEMORYUSED

      public static final int RTMEMORYUSED
      The struct member offsets.
    • TRANSIENTVBUSED

      public static final int TRANSIENTVBUSED
      The struct member offsets.
    • TRANSIENTIBUSED

      public static final int TRANSIENTIBUSED
      The struct member offsets.
    • NUMPRIMS

      public static final int NUMPRIMS
      The struct member offsets.
    • GPUMEMORYMAX

      public static final int GPUMEMORYMAX
      The struct member offsets.
    • GPUMEMORYUSED

      public static final int GPUMEMORYUSED
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • TEXTWIDTH

      public static final int TEXTWIDTH
      The struct member offsets.
    • TEXTHEIGHT

      public static final int TEXTHEIGHT
      The struct member offsets.
    • NUMVIEWS

      public static final int NUMVIEWS
      The struct member offsets.
    • VIEWSTATS

      public static final int VIEWSTATS
      The struct member offsets.
    • NUMENCODERS

      public static final int NUMENCODERS
      The struct member offsets.
    • ENCODERSTATS

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

    • BGFXStats

      public BGFXStats(ByteBuffer container)
      Creates a BGFXStats 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<BGFXStats>
    • cpuTimeFrame

      public long cpuTimeFrame()
      CPU time between two frame calls
    • cpuTimeBegin

      public long cpuTimeBegin()
      Render thread CPU submit begin time
    • cpuTimeEnd

      public long cpuTimeEnd()
      Render thread CPU submit end time
    • cpuTimerFreq

      public long cpuTimerFreq()
      CPU timer frequency. Timestamps-per-second.
    • gpuTimeBegin

      public long gpuTimeBegin()
      GPU frame begin time
    • gpuTimeEnd

      public long gpuTimeEnd()
      GPU frame end time
    • gpuTimerFreq

      public long gpuTimerFreq()
      GPU timer frequency
    • waitRender

      public long waitRender()
      time spent waiting for render backend thread to finish issuing draw commands to underlying graphics API
    • waitSubmit

      public long waitSubmit()
      time spent waiting for submit thread to advance to next frame
    • numDraw

      public int numDraw()
      number of draw calls submitted
    • numCompute

      public int numCompute()
      number of compute calls submitted
    • numBlit

      public int numBlit()
      number of blit calls submitted
    • maxGpuLatency

      public int maxGpuLatency()
      GPU driver latency
    • gpuFrameNum

      public int gpuFrameNum()
      frame which generated gpuTimeBegin, gpuTimeEnd
    • numDynamicIndexBuffers

      public short numDynamicIndexBuffers()
      number of used dynamic index buffers
    • numDynamicVertexBuffers

      public short numDynamicVertexBuffers()
      number of used dynamic vertex buffers
    • numFrameBuffers

      public short numFrameBuffers()
      number of used frame buffers
    • numIndexBuffers

      public short numIndexBuffers()
      number of used index buffers
    • numOcclusionQueries

      public short numOcclusionQueries()
      number of used occlusion queries
    • numPrograms

      public short numPrograms()
      number of used programs
    • numShaders

      public short numShaders()
      number of used shaders
    • numTextures

      public short numTextures()
      number of used textures
    • numUniforms

      public short numUniforms()
      number of used uniforms
    • numVertexBuffers

      public short numVertexBuffers()
      number of used vertex buffers
    • numVertexLayouts

      public short numVertexLayouts()
      number of used vertex layouts
    • textureMemoryUsed

      public long textureMemoryUsed()
      estimate of texture memory used
    • rtMemoryUsed

      public long rtMemoryUsed()
      estimate of render target memory used
    • transientVbUsed

      public int transientVbUsed()
      amount of transient vertex buffer used
    • transientIbUsed

      public int transientIbUsed()
      amount of transient index buffer used
    • numPrims

      public IntBuffer numPrims()
      number of primitives rendered
    • numPrims

      public int numPrims(int index)
      number of primitives rendered
    • gpuMemoryMax

      public long gpuMemoryMax()
      maximum available GPU memory for application
    • gpuMemoryUsed

      public long gpuMemoryUsed()
      amount of GPU memory used by the application
    • width

      public short width()
      backbuffer width in pixels
    • height

      public short height()
      backbuffer height in pixels
    • textWidth

      public short textWidth()
      debug text width in characters
    • textHeight

      public short textHeight()
      debug text height in characters
    • numViews

      public short numViews()
      number of view stats
    • viewStats

      public BGFXViewStats.Buffer viewStats()
      array of view stats
    • numEncoders

      public short numEncoders()
      number of encoders used during frame
    • encoderStats

      public BGFXEncoderStats.Buffer encoderStats()
      array of encoder stats
    • create

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

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

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

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

      public static long ncpuTimeFrame(long struct)
      Unsafe version of cpuTimeFrame().
    • ncpuTimeBegin

      public static long ncpuTimeBegin(long struct)
      Unsafe version of cpuTimeBegin().
    • ncpuTimeEnd

      public static long ncpuTimeEnd(long struct)
      Unsafe version of cpuTimeEnd().
    • ncpuTimerFreq

      public static long ncpuTimerFreq(long struct)
      Unsafe version of cpuTimerFreq().
    • ngpuTimeBegin

      public static long ngpuTimeBegin(long struct)
      Unsafe version of gpuTimeBegin().
    • ngpuTimeEnd

      public static long ngpuTimeEnd(long struct)
      Unsafe version of gpuTimeEnd().
    • ngpuTimerFreq

      public static long ngpuTimerFreq(long struct)
      Unsafe version of gpuTimerFreq().
    • nwaitRender

      public static long nwaitRender(long struct)
      Unsafe version of waitRender().
    • nwaitSubmit

      public static long nwaitSubmit(long struct)
      Unsafe version of waitSubmit().
    • nnumDraw

      public static int nnumDraw(long struct)
      Unsafe version of numDraw().
    • nnumCompute

      public static int nnumCompute(long struct)
      Unsafe version of numCompute().
    • nnumBlit

      public static int nnumBlit(long struct)
      Unsafe version of numBlit().
    • nmaxGpuLatency

      public static int nmaxGpuLatency(long struct)
      Unsafe version of maxGpuLatency().
    • ngpuFrameNum

      public static int ngpuFrameNum(long struct)
      Unsafe version of gpuFrameNum().
    • nnumDynamicIndexBuffers

      public static short nnumDynamicIndexBuffers(long struct)
      Unsafe version of numDynamicIndexBuffers().
    • nnumDynamicVertexBuffers

      public static short nnumDynamicVertexBuffers(long struct)
      Unsafe version of numDynamicVertexBuffers().
    • nnumFrameBuffers

      public static short nnumFrameBuffers(long struct)
      Unsafe version of numFrameBuffers().
    • nnumIndexBuffers

      public static short nnumIndexBuffers(long struct)
      Unsafe version of numIndexBuffers().
    • nnumOcclusionQueries

      public static short nnumOcclusionQueries(long struct)
      Unsafe version of numOcclusionQueries().
    • nnumPrograms

      public static short nnumPrograms(long struct)
      Unsafe version of numPrograms().
    • nnumShaders

      public static short nnumShaders(long struct)
      Unsafe version of numShaders().
    • nnumTextures

      public static short nnumTextures(long struct)
      Unsafe version of numTextures().
    • nnumUniforms

      public static short nnumUniforms(long struct)
      Unsafe version of numUniforms().
    • nnumVertexBuffers

      public static short nnumVertexBuffers(long struct)
      Unsafe version of numVertexBuffers().
    • nnumVertexLayouts

      public static short nnumVertexLayouts(long struct)
      Unsafe version of numVertexLayouts().
    • ntextureMemoryUsed

      public static long ntextureMemoryUsed(long struct)
      Unsafe version of textureMemoryUsed().
    • nrtMemoryUsed

      public static long nrtMemoryUsed(long struct)
      Unsafe version of rtMemoryUsed().
    • ntransientVbUsed

      public static int ntransientVbUsed(long struct)
      Unsafe version of transientVbUsed().
    • ntransientIbUsed

      public static int ntransientIbUsed(long struct)
      Unsafe version of transientIbUsed().
    • nnumPrims

      public static IntBuffer nnumPrims(long struct)
      Unsafe version of numPrims().
    • nnumPrims

      public static int nnumPrims(long struct, int index)
      Unsafe version of numPrims.
    • ngpuMemoryMax

      public static long ngpuMemoryMax(long struct)
      Unsafe version of gpuMemoryMax().
    • ngpuMemoryUsed

      public static long ngpuMemoryUsed(long struct)
      Unsafe version of gpuMemoryUsed().
    • nwidth

      public static short nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static short nheight(long struct)
      Unsafe version of height().
    • ntextWidth

      public static short ntextWidth(long struct)
      Unsafe version of textWidth().
    • ntextHeight

      public static short ntextHeight(long struct)
      Unsafe version of textHeight().
    • nnumViews

      public static short nnumViews(long struct)
      Unsafe version of numViews().
    • nviewStats

      public static BGFXViewStats.Buffer nviewStats(long struct)
      Unsafe version of viewStats().
    • nnumEncoders

      public static short nnumEncoders(long struct)
      Unsafe version of numEncoders().
    • nencoderStats

      public static BGFXEncoderStats.Buffer nencoderStats(long struct)
      Unsafe version of encoderStats().