Package org.lwjgl.openvr
Class CompositorFrameTiming
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Provides a single frame's timing information to the app.
Layout
struct Compositor_FrameTiming {
uint32_t m_nSize()
;
uint32_t m_nFrameIndex;
uint32_t m_nNumFramePresents()
;
uint32_t m_nNumMisPresented()
;
uint32_t m_nNumDroppedFrames()
;
uint32_t m_nReprojectionFlags;
double m_flSystemTimeInSeconds()
;
float m_flPreSubmitGpuMs()
;
float m_flPostSubmitGpuMs()
;
float m_flTotalRenderGpuMs()
;
float m_flCompositorRenderGpuMs()
;
float m_flCompositorRenderCpuMs()
;
float m_flCompositorIdleCpuMs()
;
float m_flClientFrameIntervalMs()
;
float m_flPresentCallCpuMs()
;
float m_flWaitForPresentCpuMs()
;
float m_flSubmitFrameMs()
;
float m_flWaitGetPosesCalledMs;
float m_flNewPosesReadyMs;
float m_flNewFrameReadyMs()
;
float m_flCompositorUpdateStartMs;
float m_flCompositorUpdateEndMs;
float m_flCompositorRenderStartMs;
TrackedDevicePose_t
m_HmdPose()
;
uint32_t m_nNumVSyncsReadyForUse;
uint32_t m_nNumVSyncsToFirstView;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionCompositorFrameTiming
(ByteBuffer container) Creates aCompositorFrameTiming
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompositorFrameTiming
calloc()
Returns a newCompositorFrameTiming
instance allocated withmemCalloc
.static CompositorFrameTiming.Buffer
calloc
(int capacity) Returns a newCompositorFrameTiming.Buffer
instance allocated withmemCalloc
.static CompositorFrameTiming.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newCompositorFrameTiming.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CompositorFrameTiming
calloc
(MemoryStack stack) Returns a newCompositorFrameTiming
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CompositorFrameTiming
Deprecated.static CompositorFrameTiming.Buffer
callocStack
(int capacity) Deprecated.static CompositorFrameTiming.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static CompositorFrameTiming
callocStack
(MemoryStack stack) Deprecated.static CompositorFrameTiming
create()
Returns a newCompositorFrameTiming
instance allocated withBufferUtils
.static CompositorFrameTiming.Buffer
create
(int capacity) Returns a newCompositorFrameTiming.Buffer
instance allocated withBufferUtils
.static CompositorFrameTiming
create
(long address) Returns a newCompositorFrameTiming
instance for the specified memory address.static CompositorFrameTiming.Buffer
create
(long address, int capacity) Create aCompositorFrameTiming.Buffer
instance at the specified memory.static CompositorFrameTiming
createSafe
(long address) static CompositorFrameTiming.Buffer
createSafe
(long address, int capacity) float
time between calls toWaitGetPoses
float
time spent waiting for running start (application could have used this much more time)float
time spent on cpu submitting the above work for this framefloat
time spend performing distortion correction, rendering chaperone, overlays, etc.float
float
float
float
second call toSubmit
float
float
additional time spent rendering by application (e.g.float
time blocked on call to present (usually 0.0, but can go long)float
time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)float
time spent inSubmit
(not near-zero indicates driver issue)double
Absolute time reference for comparing frames.float
time between work submitted immediately after present (ideally vsync) until the end of compositor submitted workfloat
time spent spin-waiting for frame index to change (not near-zero indicates wait object failure)float
pose used by app to render this frameint
int
number of additional times previous frame was scanned outint
number of times this frame was presentedint
number of times this frame was presented on a vsync other than it was originally predicted toint
int
int
int
m_nSize()
Set tosizeof( Compositor_FrameTiming )
static CompositorFrameTiming
malloc()
Returns a newCompositorFrameTiming
instance allocated withmemAlloc
.static CompositorFrameTiming.Buffer
malloc
(int capacity) Returns a newCompositorFrameTiming.Buffer
instance allocated withmemAlloc
.static CompositorFrameTiming.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newCompositorFrameTiming.Buffer
instance allocated on the specifiedMemoryStack
.static CompositorFrameTiming
malloc
(MemoryStack stack) Returns a newCompositorFrameTiming
instance allocated on the specifiedMemoryStack
.static CompositorFrameTiming
Deprecated.static CompositorFrameTiming.Buffer
mallocStack
(int capacity) Deprecated.static CompositorFrameTiming.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static CompositorFrameTiming
mallocStack
(MemoryStack stack) Deprecated.static float
nm_flClientFrameIntervalMs
(long struct) Unsafe version ofm_flClientFrameIntervalMs()
.static float
nm_flCompositorIdleCpuMs
(long struct) Unsafe version ofm_flCompositorIdleCpuMs()
.static float
nm_flCompositorRenderCpuMs
(long struct) Unsafe version ofm_flCompositorRenderCpuMs()
.static float
nm_flCompositorRenderGpuMs
(long struct) Unsafe version ofm_flCompositorRenderGpuMs()
.static float
nm_flCompositorRenderStartMs
(long struct) Unsafe version ofm_flCompositorRenderStartMs()
.static float
nm_flCompositorUpdateEndMs
(long struct) Unsafe version ofm_flCompositorUpdateEndMs()
.static float
nm_flCompositorUpdateStartMs
(long struct) Unsafe version ofm_flCompositorUpdateStartMs()
.static float
nm_flNewFrameReadyMs
(long struct) Unsafe version ofm_flNewFrameReadyMs()
.static float
nm_flNewPosesReadyMs
(long struct) Unsafe version ofm_flNewPosesReadyMs()
.static float
nm_flPostSubmitGpuMs
(long struct) Unsafe version ofm_flPostSubmitGpuMs()
.static float
nm_flPresentCallCpuMs
(long struct) Unsafe version ofm_flPresentCallCpuMs()
.static float
nm_flPreSubmitGpuMs
(long struct) Unsafe version ofm_flPreSubmitGpuMs()
.static float
nm_flSubmitFrameMs
(long struct) Unsafe version ofm_flSubmitFrameMs()
.static double
nm_flSystemTimeInSeconds
(long struct) Unsafe version ofm_flSystemTimeInSeconds()
.static float
nm_flTotalRenderGpuMs
(long struct) Unsafe version ofm_flTotalRenderGpuMs()
.static float
nm_flWaitForPresentCpuMs
(long struct) Unsafe version ofm_flWaitForPresentCpuMs()
.static float
nm_flWaitGetPosesCalledMs
(long struct) Unsafe version ofm_flWaitGetPosesCalledMs()
.static TrackedDevicePose
nm_HmdPose
(long struct) Unsafe version ofm_HmdPose()
.static int
nm_nFrameIndex
(long struct) Unsafe version ofm_nFrameIndex()
.static int
nm_nNumDroppedFrames
(long struct) Unsafe version ofm_nNumDroppedFrames()
.static int
nm_nNumFramePresents
(long struct) Unsafe version ofm_nNumFramePresents()
.static int
nm_nNumMisPresented
(long struct) Unsafe version ofm_nNumMisPresented()
.static int
nm_nNumVSyncsReadyForUse
(long struct) Unsafe version ofm_nNumVSyncsReadyForUse()
.static int
nm_nNumVSyncsToFirstView
(long struct) Unsafe version ofm_nNumVSyncsToFirstView()
.static int
nm_nReprojectionFlags
(long struct) Unsafe version ofm_nReprojectionFlags()
.static int
nm_nSize
(long struct) Unsafe version ofm_nSize()
.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
M_NSIZE
public static final int M_NSIZEThe struct member offsets. -
M_NFRAMEINDEX
public static final int M_NFRAMEINDEXThe struct member offsets. -
M_NNUMFRAMEPRESENTS
public static final int M_NNUMFRAMEPRESENTSThe struct member offsets. -
M_NNUMMISPRESENTED
public static final int M_NNUMMISPRESENTEDThe struct member offsets. -
M_NNUMDROPPEDFRAMES
public static final int M_NNUMDROPPEDFRAMESThe struct member offsets. -
M_NREPROJECTIONFLAGS
public static final int M_NREPROJECTIONFLAGSThe struct member offsets. -
M_FLSYSTEMTIMEINSECONDS
public static final int M_FLSYSTEMTIMEINSECONDSThe struct member offsets. -
M_FLPRESUBMITGPUMS
public static final int M_FLPRESUBMITGPUMSThe struct member offsets. -
M_FLPOSTSUBMITGPUMS
public static final int M_FLPOSTSUBMITGPUMSThe struct member offsets. -
M_FLTOTALRENDERGPUMS
public static final int M_FLTOTALRENDERGPUMSThe struct member offsets. -
M_FLCOMPOSITORRENDERGPUMS
public static final int M_FLCOMPOSITORRENDERGPUMSThe struct member offsets. -
M_FLCOMPOSITORRENDERCPUMS
public static final int M_FLCOMPOSITORRENDERCPUMSThe struct member offsets. -
M_FLCOMPOSITORIDLECPUMS
public static final int M_FLCOMPOSITORIDLECPUMSThe struct member offsets. -
M_FLCLIENTFRAMEINTERVALMS
public static final int M_FLCLIENTFRAMEINTERVALMSThe struct member offsets. -
M_FLPRESENTCALLCPUMS
public static final int M_FLPRESENTCALLCPUMSThe struct member offsets. -
M_FLWAITFORPRESENTCPUMS
public static final int M_FLWAITFORPRESENTCPUMSThe struct member offsets. -
M_FLSUBMITFRAMEMS
public static final int M_FLSUBMITFRAMEMSThe struct member offsets. -
M_FLWAITGETPOSESCALLEDMS
public static final int M_FLWAITGETPOSESCALLEDMSThe struct member offsets. -
M_FLNEWPOSESREADYMS
public static final int M_FLNEWPOSESREADYMSThe struct member offsets. -
M_FLNEWFRAMEREADYMS
public static final int M_FLNEWFRAMEREADYMSThe struct member offsets. -
M_FLCOMPOSITORUPDATESTARTMS
public static final int M_FLCOMPOSITORUPDATESTARTMSThe struct member offsets. -
M_FLCOMPOSITORUPDATEENDMS
public static final int M_FLCOMPOSITORUPDATEENDMSThe struct member offsets. -
M_FLCOMPOSITORRENDERSTARTMS
public static final int M_FLCOMPOSITORRENDERSTARTMSThe struct member offsets. -
M_HMDPOSE
public static final int M_HMDPOSEThe struct member offsets. -
M_NNUMVSYNCSREADYFORUSE
public static final int M_NNUMVSYNCSREADYFORUSEThe struct member offsets. -
M_NNUMVSYNCSTOFIRSTVIEW
public static final int M_NNUMVSYNCSTOFIRSTVIEWThe struct member offsets.
-
-
Constructor Details
-
CompositorFrameTiming
Creates aCompositorFrameTiming
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<CompositorFrameTiming>
-
m_nSize
public int m_nSize()Set tosizeof( Compositor_FrameTiming )
-
m_nFrameIndex
public int m_nFrameIndex()- Returns:
- the value of the
m_nFrameIndex
field.
-
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_nReprojectionFlags
field.
-
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_flWaitGetPosesCalledMs
field.
-
m_flNewPosesReadyMs
public float m_flNewPosesReadyMs()- Returns:
- the value of the
m_flNewPosesReadyMs
field.
-
m_flNewFrameReadyMs
public float m_flNewFrameReadyMs()second call toSubmit
-
m_flCompositorUpdateStartMs
public float m_flCompositorUpdateStartMs()- Returns:
- the value of the
m_flCompositorUpdateStartMs
field.
-
m_flCompositorUpdateEndMs
public float m_flCompositorUpdateEndMs()- Returns:
- the value of the
m_flCompositorUpdateEndMs
field.
-
m_flCompositorRenderStartMs
public float m_flCompositorRenderStartMs()- Returns:
- the value of the
m_flCompositorRenderStartMs
field.
-
m_HmdPose
pose used by app to render this frame -
m_nNumVSyncsReadyForUse
public int m_nNumVSyncsReadyForUse()- Returns:
- the value of the
m_nNumVSyncsReadyForUse
field.
-
m_nNumVSyncsToFirstView
public int m_nNumVSyncsToFirstView()- Returns:
- the value of the
m_nNumVSyncsToFirstView
field.
-
malloc
Returns a newCompositorFrameTiming
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newCompositorFrameTiming
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newCompositorFrameTiming
instance allocated withBufferUtils
. -
create
Returns a newCompositorFrameTiming
instance for the specified memory address. -
createSafe
-
malloc
Returns a newCompositorFrameTiming.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newCompositorFrameTiming.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newCompositorFrameTiming.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aCompositorFrameTiming.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newCompositorFrameTiming
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newCompositorFrameTiming
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newCompositorFrameTiming.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newCompositorFrameTiming.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
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
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()
.
-