Package org.lwjgl.openvr
Class CompositorFrameTiming
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CompositorFrameTiming>
org.lwjgl.openvr.CompositorFrameTiming
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CompositorFrameTiming
extends org.lwjgl.system.Struct<CompositorFrameTiming>
implements org.lwjgl.system.NativeResource
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;
float m_flTransferLatencyMs;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCompositorFrameTiming(ByteBuffer container) Creates aCompositorFrameTiminginstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 CompositorFrameTimingDeprecated.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 @Nullable CompositorFrameTimingcreateSafe(long address) static @Nullable CompositorFrameTiming.BuffercreateSafe(long address, int capacity) floattime between calls toWaitGetPosesfloattime spent waiting for running start (application could have used this much more time)floattime spent on cpu submitting the above work for this framefloattime spend performing distortion correction, rendering chaperone, overlays, etc.floatfloatfloatfloatsecond call toSubmitfloatfloatadditional time spent rendering by application (e.g.floattime blocked on call to present (usually 0.0, but can go long)floattime spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)floattime spent inSubmit(not near-zero indicates driver issue)doubleAbsolute time reference for comparing frames.floattime between work submitted immediately after present (ideally vsync) until the end of compositor submitted workfloatfloattime spent spin-waiting for frame index to change (not near-zero indicates wait object failure)floatpose used by app to render this frameintintnumber of additional times previous frame was scanned outintnumber of times this frame was presentedintnumber of times this frame was presented on a vsync other than it was originally predicted tointintintintm_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 CompositorFrameTimingDeprecated.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_flTransferLatencyMs(long struct) Unsafe version ofm_flTransferLatencyMs().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()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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. -
M_FLTRANSFERLATENCYMS
public static final int M_FLTRANSFERLATENCYMSThe struct member offsets.
-
-
Constructor Details
-
CompositorFrameTiming
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<CompositorFrameTiming>
-
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
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.
-
m_flTransferLatencyMs
public float m_flTransferLatencyMs()- Returns:
- the value of the
m_flTransferLatencyMsfield.
-
malloc
Returns a newCompositorFrameTiminginstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCompositorFrameTiminginstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCompositorFrameTiminginstance allocated withBufferUtils. -
create
Returns a newCompositorFrameTiminginstance for the specified memory address. -
createSafe
-
malloc
Returns a newCompositorFrameTiming.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCompositorFrameTiming.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCompositorFrameTiming.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCompositorFrameTiming.Bufferinstance 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 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
Returns a newCompositorFrameTiminginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCompositorFrameTiminginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCompositorFrameTiming.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCompositorFrameTiming.Bufferinstance allocated on the specifiedMemoryStackand 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(). -
nm_flTransferLatencyMs
public static float nm_flTransferLatencyMs(long struct) Unsafe version ofm_flTransferLatencyMs().
-