Package org.lwjgl.openvr
Class CompositorFrameTiming
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.CompositorFrameTiming
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CompositorFrameTiming extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceProvides a single frame's timing information to the app.Layout
struct Compositor_FrameTiming { uint32_tm_nSize(); uint32_t m_nFrameIndex; uint32_tm_nNumFramePresents(); uint32_tm_nNumMisPresented(); uint32_tm_nNumDroppedFrames(); uint32_t m_nReprojectionFlags; doublem_flSystemTimeInSeconds(); floatm_flPreSubmitGpuMs(); floatm_flPostSubmitGpuMs(); floatm_flTotalRenderGpuMs(); floatm_flCompositorRenderGpuMs(); floatm_flCompositorRenderCpuMs(); floatm_flCompositorIdleCpuMs(); floatm_flClientFrameIntervalMs(); floatm_flPresentCallCpuMs(); floatm_flWaitForPresentCpuMs(); floatm_flSubmitFrameMs(); float m_flWaitGetPosesCalledMs; float m_flNewPosesReadyMs; floatm_flNewFrameReadyMs(); float m_flCompositorUpdateStartMs; float m_flCompositorUpdateEndMs; float m_flCompositorRenderStartMs;TrackedDevicePose_tm_HmdPose(); uint32_t m_nNumVSyncsReadyForUse; uint32_t m_nNumVSyncsToFirstView; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompositorFrameTiming.BufferAn array ofCompositorFrameTimingstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intM_FLCLIENTFRAMEINTERVALMS
M_FLCOMPOSITORIDLECPUMS
M_FLCOMPOSITORRENDERCPUMS
M_FLCOMPOSITORRENDERGPUMS
M_FLCOMPOSITORRENDERSTARTMS
M_FLCOMPOSITORUPDATEENDMS
M_FLCOMPOSITORUPDATESTARTMS
M_FLNEWFRAMEREADYMS
M_FLNEWPOSESREADYMS
M_FLPOSTSUBMITGPUMS
M_FLPRESENTCALLCPUMS
M_FLPRESUBMITGPUMS
M_FLSUBMITFRAMEMS
M_FLSYSTEMTIMEINSECONDS
M_FLTOTALRENDERGPUMS
M_FLWAITFORPRESENTCPUMS
M_FLWAITGETPOSESCALLEDMS
M_HMDPOSE
M_NFRAMEINDEX
M_NNUMDROPPEDFRAMES
M_NNUMFRAMEPRESENTS
M_NNUMMISPRESENTED
M_NNUMVSYNCSREADYFORUSE
M_NNUMVSYNCSTOFIRSTVIEW
M_NREPROJECTIONFLAGS
M_NSIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description CompositorFrameTiming(java.nio.ByteBuffer container)Creates aCompositorFrameTiminginstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CompositorFrameTimingcalloc()Returns a newCompositorFrameTiminginstance allocated withmemCalloc.static CompositorFrameTiming.Buffercalloc(int capacity)Returns a newCompositorFrameTiming.Bufferinstance allocated withmemCalloc.static CompositorFrameTiming.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCompositorFrameTiming.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CompositorFrameTimingcalloc(org.lwjgl.system.MemoryStack stack)Returns a newCompositorFrameTiminginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CompositorFrameTimingcallocStack()Deprecated.static CompositorFrameTiming.BuffercallocStack(int capacity)Deprecated.static CompositorFrameTiming.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CompositorFrameTimingcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static CompositorFrameTimingcreate()Returns a newCompositorFrameTiminginstance allocated withBufferUtils.static CompositorFrameTiming.Buffercreate(int capacity)Returns a newCompositorFrameTiming.Bufferinstance allocated withBufferUtils.static CompositorFrameTimingcreate(long address)Returns a newCompositorFrameTiminginstance for the specified memory address.static CompositorFrameTiming.Buffercreate(long address, int capacity)Create aCompositorFrameTiming.Bufferinstance at the specified memory.static CompositorFrameTimingcreateSafe(long address)static CompositorFrameTiming.BuffercreateSafe(long address, int capacity)floatm_flClientFrameIntervalMs()time between calls toWaitGetPosesfloatm_flCompositorIdleCpuMs()time spent waiting for running start (application could have used this much more time)floatm_flCompositorRenderCpuMs()time spent on cpu submitting the above work for this framefloatm_flCompositorRenderGpuMs()time spend performing distortion correction, rendering chaperone, overlays, etc.floatm_flCompositorRenderStartMs()floatm_flCompositorUpdateEndMs()floatm_flCompositorUpdateStartMs()floatm_flNewFrameReadyMs()second call toSubmitfloatm_flNewPosesReadyMs()floatm_flPostSubmitGpuMs()additional time spent rendering by application (e.g.floatm_flPresentCallCpuMs()time blocked on call to present (usually 0.0, but can go long)floatm_flPreSubmitGpuMs()time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)floatm_flSubmitFrameMs()time spent inSubmit(not near-zero indicates driver issue)doublem_flSystemTimeInSeconds()Absolute time reference for comparing frames.floatm_flTotalRenderGpuMs()time between work submitted immediately after present (ideally vsync) until the end of compositor submitted workfloatm_flWaitForPresentCpuMs()time spent spin-waiting for frame index to change (not near-zero indicates wait object failure)floatm_flWaitGetPosesCalledMs()TrackedDevicePosem_HmdPose()pose used by app to render this frameintm_nFrameIndex()intm_nNumDroppedFrames()number of additional times previous frame was scanned outintm_nNumFramePresents()number of times this frame was presentedintm_nNumMisPresented()number of times this frame was presented on a vsync other than it was originally predicted tointm_nNumVSyncsReadyForUse()intm_nNumVSyncsToFirstView()intm_nReprojectionFlags()intm_nSize()Set tosizeof( Compositor_FrameTiming )static CompositorFrameTimingmalloc()Returns a newCompositorFrameTiminginstance allocated withmemAlloc.static CompositorFrameTiming.Buffermalloc(int capacity)Returns a newCompositorFrameTiming.Bufferinstance allocated withmemAlloc.static CompositorFrameTiming.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCompositorFrameTiming.Bufferinstance allocated on the specifiedMemoryStack.static CompositorFrameTimingmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCompositorFrameTiminginstance allocated on the specifiedMemoryStack.static CompositorFrameTimingmallocStack()Deprecated.static CompositorFrameTiming.BuffermallocStack(int capacity)Deprecated.static CompositorFrameTiming.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CompositorFrameTimingmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static floatnm_flClientFrameIntervalMs(long struct)Unsafe version ofm_flClientFrameIntervalMs().static floatnm_flCompositorIdleCpuMs(long struct)Unsafe version ofm_flCompositorIdleCpuMs().static floatnm_flCompositorRenderCpuMs(long struct)Unsafe version ofm_flCompositorRenderCpuMs().static floatnm_flCompositorRenderGpuMs(long struct)Unsafe version ofm_flCompositorRenderGpuMs().static floatnm_flCompositorRenderStartMs(long struct)Unsafe version ofm_flCompositorRenderStartMs().static floatnm_flCompositorUpdateEndMs(long struct)Unsafe version ofm_flCompositorUpdateEndMs().static floatnm_flCompositorUpdateStartMs(long struct)Unsafe version ofm_flCompositorUpdateStartMs().static floatnm_flNewFrameReadyMs(long struct)Unsafe version ofm_flNewFrameReadyMs().static floatnm_flNewPosesReadyMs(long struct)Unsafe version ofm_flNewPosesReadyMs().static floatnm_flPostSubmitGpuMs(long struct)Unsafe version ofm_flPostSubmitGpuMs().static floatnm_flPresentCallCpuMs(long struct)Unsafe version ofm_flPresentCallCpuMs().static floatnm_flPreSubmitGpuMs(long struct)Unsafe version ofm_flPreSubmitGpuMs().static floatnm_flSubmitFrameMs(long struct)Unsafe version ofm_flSubmitFrameMs().static doublenm_flSystemTimeInSeconds(long struct)Unsafe version ofm_flSystemTimeInSeconds().static floatnm_flTotalRenderGpuMs(long struct)Unsafe version ofm_flTotalRenderGpuMs().static floatnm_flWaitForPresentCpuMs(long struct)Unsafe version ofm_flWaitForPresentCpuMs().static floatnm_flWaitGetPosesCalledMs(long struct)Unsafe version ofm_flWaitGetPosesCalledMs().static TrackedDevicePosenm_HmdPose(long struct)Unsafe version ofm_HmdPose().static intnm_nFrameIndex(long struct)Unsafe version ofm_nFrameIndex().static intnm_nNumDroppedFrames(long struct)Unsafe version ofm_nNumDroppedFrames().static intnm_nNumFramePresents(long struct)Unsafe version ofm_nNumFramePresents().static intnm_nNumMisPresented(long struct)Unsafe version ofm_nNumMisPresented().static intnm_nNumVSyncsReadyForUse(long struct)Unsafe version ofm_nNumVSyncsReadyForUse().static intnm_nNumVSyncsToFirstView(long struct)Unsafe version ofm_nNumVSyncsToFirstView().static intnm_nReprojectionFlags(long struct)Unsafe version ofm_nReprojectionFlags().static intnm_nSize(long struct)Unsafe version ofm_nSize().intsizeof()
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
M_NSIZE, M_NFRAMEINDEX, M_NNUMFRAMEPRESENTS, M_NNUMMISPRESENTED, M_NNUMDROPPEDFRAMES, M_NREPROJECTIONFLAGS, M_FLSYSTEMTIMEINSECONDS, M_FLPRESUBMITGPUMS, M_FLPOSTSUBMITGPUMS, M_FLTOTALRENDERGPUMS, M_FLCOMPOSITORRENDERGPUMS, M_FLCOMPOSITORRENDERCPUMS, M_FLCOMPOSITORIDLECPUMS, M_FLCLIENTFRAMEINTERVALMS, M_FLPRESENTCALLCPUMS, M_FLWAITFORPRESENTCPUMS, M_FLSUBMITFRAMEMS, M_FLWAITGETPOSESCALLEDMS, M_FLNEWPOSESREADYMS, M_FLNEWFRAMEREADYMS, M_FLCOMPOSITORUPDATESTARTMS, M_FLCOMPOSITORUPDATEENDMS, M_FLCOMPOSITORRENDERSTARTMS, M_HMDPOSE, M_NNUMVSYNCSREADYFORUSE, M_NNUMVSYNCSTOFIRSTVIEW
The struct member offsets.
-
-
Constructor Detail
-
CompositorFrameTiming
public CompositorFrameTiming(java.nio.ByteBuffer container)
Creates aCompositorFrameTiminginstance 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
-
m_nSize
public int m_nSize()
Set tosizeof( Compositor_FrameTiming )
-
m_nFrameIndex
public int m_nFrameIndex()
- Returns:
- the value of the
m_nFrameIndexfield.
-
m_nNumFramePresents
public int m_nNumFramePresents()
number of times this frame was presented
-
m_nNumMisPresented
public int m_nNumMisPresented()
number of times this frame was presented on a vsync other than it was originally predicted to
-
m_nNumDroppedFrames
public int m_nNumDroppedFrames()
number of additional times previous frame was scanned out
-
m_nReprojectionFlags
public int m_nReprojectionFlags()
- Returns:
- the value of the
m_nReprojectionFlagsfield.
-
m_flSystemTimeInSeconds
public double m_flSystemTimeInSeconds()
Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to.
-
m_flPreSubmitGpuMs
public float m_flPreSubmitGpuMs()
time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)
-
m_flPostSubmitGpuMs
public float m_flPostSubmitGpuMs()
additional time spent rendering by application (e.g. companion window)
-
m_flTotalRenderGpuMs
public float m_flTotalRenderGpuMs()
time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work
-
m_flCompositorRenderGpuMs
public float m_flCompositorRenderGpuMs()
time spend performing distortion correction, rendering chaperone, overlays, etc.
-
m_flCompositorRenderCpuMs
public float m_flCompositorRenderCpuMs()
time spent on cpu submitting the above work for this frame
-
m_flCompositorIdleCpuMs
public float m_flCompositorIdleCpuMs()
time spent waiting for running start (application could have used this much more time)
-
m_flClientFrameIntervalMs
public float m_flClientFrameIntervalMs()
time between calls toWaitGetPoses
-
m_flPresentCallCpuMs
public float m_flPresentCallCpuMs()
time blocked on call to present (usually 0.0, but can go long)
-
m_flWaitForPresentCpuMs
public float m_flWaitForPresentCpuMs()
time spent spin-waiting for frame index to change (not near-zero indicates wait object failure)
-
m_flSubmitFrameMs
public float m_flSubmitFrameMs()
time spent inSubmit(not near-zero indicates driver issue)
-
m_flWaitGetPosesCalledMs
public float m_flWaitGetPosesCalledMs()
- Returns:
- the value of the
m_flWaitGetPosesCalledMsfield.
-
m_flNewPosesReadyMs
public float m_flNewPosesReadyMs()
- Returns:
- the value of the
m_flNewPosesReadyMsfield.
-
m_flNewFrameReadyMs
public float m_flNewFrameReadyMs()
second call toSubmit
-
m_flCompositorUpdateStartMs
public float m_flCompositorUpdateStartMs()
- Returns:
- the value of the
m_flCompositorUpdateStartMsfield.
-
m_flCompositorUpdateEndMs
public float m_flCompositorUpdateEndMs()
- Returns:
- the value of the
m_flCompositorUpdateEndMsfield.
-
m_flCompositorRenderStartMs
public float m_flCompositorRenderStartMs()
- Returns:
- the value of the
m_flCompositorRenderStartMsfield.
-
m_HmdPose
public TrackedDevicePose m_HmdPose()
pose used by app to render this frame
-
m_nNumVSyncsReadyForUse
public int m_nNumVSyncsReadyForUse()
- Returns:
- the value of the
m_nNumVSyncsReadyForUsefield.
-
m_nNumVSyncsToFirstView
public int m_nNumVSyncsToFirstView()
- Returns:
- the value of the
m_nNumVSyncsToFirstViewfield.
-
malloc
public static CompositorFrameTiming malloc()
Returns a newCompositorFrameTiminginstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CompositorFrameTiming calloc()
Returns a newCompositorFrameTiminginstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CompositorFrameTiming create()
Returns a newCompositorFrameTiminginstance allocated withBufferUtils.
-
create
public static CompositorFrameTiming create(long address)
Returns a newCompositorFrameTiminginstance for the specified memory address.
-
createSafe
@Nullable public static CompositorFrameTiming createSafe(long address)
-
malloc
public static CompositorFrameTiming.Buffer malloc(int capacity)
Returns a newCompositorFrameTiming.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CompositorFrameTiming.Buffer calloc(int capacity)
Returns a newCompositorFrameTiming.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CompositorFrameTiming.Buffer create(int capacity)
Returns a newCompositorFrameTiming.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CompositorFrameTiming.Buffer create(long address, int capacity)
Create aCompositorFrameTiming.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CompositorFrameTiming.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CompositorFrameTiming mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CompositorFrameTiming callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CompositorFrameTiming mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CompositorFrameTiming callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CompositorFrameTiming.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CompositorFrameTiming.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static CompositorFrameTiming.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CompositorFrameTiming.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static CompositorFrameTiming malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCompositorFrameTiminginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CompositorFrameTiming calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCompositorFrameTiminginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CompositorFrameTiming.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCompositorFrameTiming.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CompositorFrameTiming.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCompositorFrameTiming.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nm_nSize
public static int nm_nSize(long struct)
Unsafe version ofm_nSize().
-
nm_nFrameIndex
public static int nm_nFrameIndex(long struct)
Unsafe version ofm_nFrameIndex().
-
nm_nNumFramePresents
public static int nm_nNumFramePresents(long struct)
Unsafe version ofm_nNumFramePresents().
-
nm_nNumMisPresented
public static int nm_nNumMisPresented(long struct)
Unsafe version ofm_nNumMisPresented().
-
nm_nNumDroppedFrames
public static int nm_nNumDroppedFrames(long struct)
Unsafe version ofm_nNumDroppedFrames().
-
nm_nReprojectionFlags
public static int nm_nReprojectionFlags(long struct)
Unsafe version ofm_nReprojectionFlags().
-
nm_flSystemTimeInSeconds
public static double nm_flSystemTimeInSeconds(long struct)
Unsafe version ofm_flSystemTimeInSeconds().
-
nm_flPreSubmitGpuMs
public static float nm_flPreSubmitGpuMs(long struct)
Unsafe version ofm_flPreSubmitGpuMs().
-
nm_flPostSubmitGpuMs
public static float nm_flPostSubmitGpuMs(long struct)
Unsafe version ofm_flPostSubmitGpuMs().
-
nm_flTotalRenderGpuMs
public static float nm_flTotalRenderGpuMs(long struct)
Unsafe version ofm_flTotalRenderGpuMs().
-
nm_flCompositorRenderGpuMs
public static float nm_flCompositorRenderGpuMs(long struct)
Unsafe version ofm_flCompositorRenderGpuMs().
-
nm_flCompositorRenderCpuMs
public static float nm_flCompositorRenderCpuMs(long struct)
Unsafe version ofm_flCompositorRenderCpuMs().
-
nm_flCompositorIdleCpuMs
public static float nm_flCompositorIdleCpuMs(long struct)
Unsafe version ofm_flCompositorIdleCpuMs().
-
nm_flClientFrameIntervalMs
public static float nm_flClientFrameIntervalMs(long struct)
Unsafe version ofm_flClientFrameIntervalMs().
-
nm_flPresentCallCpuMs
public static float nm_flPresentCallCpuMs(long struct)
Unsafe version ofm_flPresentCallCpuMs().
-
nm_flWaitForPresentCpuMs
public static float nm_flWaitForPresentCpuMs(long struct)
Unsafe version ofm_flWaitForPresentCpuMs().
-
nm_flSubmitFrameMs
public static float nm_flSubmitFrameMs(long struct)
Unsafe version ofm_flSubmitFrameMs().
-
nm_flWaitGetPosesCalledMs
public static float nm_flWaitGetPosesCalledMs(long struct)
Unsafe version ofm_flWaitGetPosesCalledMs().
-
nm_flNewPosesReadyMs
public static float nm_flNewPosesReadyMs(long struct)
Unsafe version ofm_flNewPosesReadyMs().
-
nm_flNewFrameReadyMs
public static float nm_flNewFrameReadyMs(long struct)
Unsafe version ofm_flNewFrameReadyMs().
-
nm_flCompositorUpdateStartMs
public static float nm_flCompositorUpdateStartMs(long struct)
Unsafe version ofm_flCompositorUpdateStartMs().
-
nm_flCompositorUpdateEndMs
public static float nm_flCompositorUpdateEndMs(long struct)
Unsafe version ofm_flCompositorUpdateEndMs().
-
nm_flCompositorRenderStartMs
public static float nm_flCompositorRenderStartMs(long struct)
Unsafe version ofm_flCompositorRenderStartMs().
-
nm_HmdPose
public static TrackedDevicePose nm_HmdPose(long struct)
Unsafe version ofm_HmdPose().
-
nm_nNumVSyncsReadyForUse
public static int nm_nNumVSyncsReadyForUse(long struct)
Unsafe version ofm_nNumVSyncsReadyForUse().
-
nm_nNumVSyncsToFirstView
public static int nm_nNumVSyncsToFirstView(long struct)
Unsafe version ofm_nNumVSyncsToFirstView().
-
-