Class VRCompositor
- java.lang.Object
-
- org.lwjgl.openvr.VRCompositor
-
public class VRCompositor extends java.lang.ObjectAllows the application to interact with the compositor.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnVRCompositor_GetCumulativeStats(long pStats, int nStatsSizeInBytes)Unsafe version of:GetCumulativeStatsstatic voidnVRCompositor_GetCurrentFadeColor(boolean bBackground, long __result)Unsafe version of:GetCurrentFadeColorstatic voidnVRCompositor_GetCurrentFadeColor(boolean bBackground, long __functionAddress, long __result)Unsafe version of:GetCurrentFadeColorstatic booleannVRCompositor_GetFrameTiming(long pTiming, int unFramesAgo)Unsafe version of:GetFrameTimingstatic intnVRCompositor_GetFrameTimings(long pTiming, int nFrames)Unsafe version of:GetFrameTimingsstatic intnVRCompositor_GetLastPoseForTrackedDeviceIndex(int unDeviceIndex, long pOutputPose, long pOutputGamePose)Unsafe version of:GetLastPoseForTrackedDeviceIndexstatic intnVRCompositor_GetLastPoses(long pRenderPoseArray, int unRenderPoseArrayCount, long pGamePoseArray, int unGamePoseArrayCount)Unsafe version of:GetLastPosesstatic intnVRCompositor_GetMirrorTextureD3D11(int eEye, long pD3D11DeviceOrResource, long ppD3D11ShaderResourceView)Unsafe version of:GetMirrorTextureD3D11static intnVRCompositor_GetMirrorTextureGL(int eEye, long pglTextureId, long pglSharedTextureHandle)Unsafe version of:GetMirrorTextureGLstatic intnVRCompositor_GetVulkanDeviceExtensionsRequired(long pPhysicalDevice, long pchValue, int unBufferSize)Unsafe version of:GetVulkanDeviceExtensionsRequiredstatic intnVRCompositor_GetVulkanInstanceExtensionsRequired(long pchValue, int unBufferSize)Unsafe version of:GetVulkanInstanceExtensionsRequiredstatic intnVRCompositor_SetSkyboxOverride(long pTextures, int unTextureCount)Unsafe version of:SetSkyboxOverridestatic intnVRCompositor_Submit(int eEye, long pTexture, long pBounds, int nSubmitFlags)Unsafe version of:Submitstatic intnVRCompositor_WaitGetPoses(long pRenderPoseArray, int unRenderPoseArrayCount, long pGamePoseArray, int unGamePoseArrayCount)Unsafe version of:WaitGetPosesstatic booleanVRCompositor_CanRenderScene()Returns true if the current process has the scene focus.static voidVRCompositor_ClearLastSubmittedFrame()Clears the frame that was sent with the last call to Submit.static voidVRCompositor_ClearSkyboxOverride()Resets compositor skybox back to defaults.static voidVRCompositor_CompositorBringToFront()Brings the compositor window to the front.static voidVRCompositor_CompositorDumpImages()Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root.static voidVRCompositor_CompositorGoToBack()Pushes the compositor window to the back.static voidVRCompositor_CompositorQuit()Tells the compositor process to clean up and exit.static voidVRCompositor_FadeGrid(float fSeconds, boolean bFadeIn)Fading the Grid in or out infSeconds.static voidVRCompositor_FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, boolean bBackground)Fades the view on the HMD to the specified color.static voidVRCompositor_ForceInterleavedReprojectionOn(boolean bOverride)Override interleaved reprojection logic to force on.static voidVRCompositor_ForceReconnectProcess()Force reconnecting to the compositor process.static voidVRCompositor_GetCumulativeStats(CompositorCumulativeStats pStats)Fills out stats accumulated for the last connected application.static voidVRCompositor_GetCumulativeStats(CompositorCumulativeStats pStats, int nStatsSizeInBytes)Fills out stats accumulated for the last connected application.static HmdColorVRCompositor_GetCurrentFadeColor(boolean bBackground, HmdColor __result)Get current fade color value.static floatVRCompositor_GetCurrentGridAlpha()Get current alpha value of grid.static intVRCompositor_GetCurrentSceneFocusProcess()Returns the process ID of the process that is currently rendering the scene.static floatVRCompositor_GetFrameTimeRemaining()Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame.static booleanVRCompositor_GetFrameTiming(CompositorFrameTiming.Buffer pTiming)Returns true if timing data is filled it.static intVRCompositor_GetFrameTimings(CompositorFrameTiming.Buffer pTiming)Interface for copying a range of timing data.static intVRCompositor_GetLastFrameRenderer()Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame).static intVRCompositor_GetLastPoseForTrackedDeviceIndex(int unDeviceIndex, TrackedDevicePose pOutputPose, TrackedDevicePose pOutputGamePose)Interface for accessing last set of poses returned byWaitGetPosesone at a time.static intVRCompositor_GetLastPoses(TrackedDevicePose.Buffer pRenderPoseArray, TrackedDevicePose.Buffer pGamePoseArray)Get the last set of poses returned byWaitGetPoses.static intVRCompositor_GetMirrorTextureD3D11(int eEye, long pD3D11DeviceOrResource, org.lwjgl.PointerBuffer ppD3D11ShaderResourceView)Opens a shared D3D11 texture with the undistorted composited image for each eye.static intVRCompositor_GetMirrorTextureGL(int eEye, java.nio.IntBuffer pglTextureId, org.lwjgl.PointerBuffer pglSharedTextureHandle)Access to mirror textures from OpenGL.static intVRCompositor_GetTrackingSpace()Gets current tracking space returned byWaitGetPoses.static java.lang.StringVRCompositor_GetVulkanDeviceExtensionsRequired(long pPhysicalDevice, int unBufferSize)Returns 0.static intVRCompositor_GetVulkanDeviceExtensionsRequired(long pPhysicalDevice, java.nio.ByteBuffer pchValue)Returns 0.static java.lang.StringVRCompositor_GetVulkanInstanceExtensionsRequired(int unBufferSize)Returns 0.static intVRCompositor_GetVulkanInstanceExtensionsRequired(java.nio.ByteBuffer pchValue)Returns 0.static voidVRCompositor_HideMirrorWindow()Closes the headset view, either as a window or docked widget.static booleanVRCompositor_IsCurrentSceneFocusAppLoading()Indicates whether or not the current scene focus app is currently loading.static booleanVRCompositor_IsFullscreen()Return whether the compositor is fullscreen.static booleanVRCompositor_IsMirrorWindowVisible()Returns true if the headset view (either as a window or docked widget) is shown.static booleanVRCompositor_IsMotionSmoothingEnabled()Indicates whether or not motion smoothing is enabled by the user settings.static booleanVRCompositor_IsMotionSmoothingSupported()Indicates whether or not motion smoothing is supported by the current hardware.static voidVRCompositor_LockGLSharedTextureForAccess(long glSharedTextureHandle)static voidVRCompositor_PostPresentHandoff()Call immediately after presenting your app's window (i.e.static voidVRCompositor_ReleaseMirrorTextureD3D11(long pD3D11ShaderResourceView)Releases a shared D3D11 texture.static booleanVRCompositor_ReleaseSharedGLTexture(int glTextureId, long glSharedTextureHandle)static voidVRCompositor_SetExplicitTimingMode(int eTimingMode)Vulkan/D3D12 Onlystatic intVRCompositor_SetSkyboxOverride(Texture.Buffer pTextures)Override the skybox used in the compositor (e.g.static voidVRCompositor_SetTrackingSpace(int eOrigin)Sets tracking space returned byWaitGetPoses.static booleanVRCompositor_ShouldAppRenderWithLowResources()Let an app know it should be rendering with low resources.static voidVRCompositor_ShowMirrorWindow()Opens the headset view (as either a window or docked widget depending on user's preferences) that displays what the user sees in the headset.static intVRCompositor_Submit(int eEye, Texture pTexture, VRTextureBounds pBounds, int nSubmitFlags)Updated scene texture to display.static intVRCompositor_SubmitExplicitTimingData()Vulkan/D3D12 Onlystatic voidVRCompositor_SuspendRendering(boolean bSuspend)Temporarily suspends rendering (useful for finer control over scene transitions).static voidVRCompositor_UnlockGLSharedTextureForAccess(long glSharedTextureHandle)static intVRCompositor_WaitGetPoses(TrackedDevicePose.Buffer pRenderPoseArray, TrackedDevicePose.Buffer pGamePoseArray)Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay).
-
-
-
Method Detail
-
VRCompositor_SetTrackingSpace
public static void VRCompositor_SetTrackingSpace(int eOrigin)
Sets tracking space returned byWaitGetPoses.
-
VRCompositor_GetTrackingSpace
public static int VRCompositor_GetTrackingSpace()
Gets current tracking space returned byWaitGetPoses.
-
nVRCompositor_WaitGetPoses
public static int nVRCompositor_WaitGetPoses(long pRenderPoseArray, int unRenderPoseArrayCount, long pGamePoseArray, int unGamePoseArrayCount)Unsafe version of:WaitGetPoses
-
VRCompositor_WaitGetPoses
public static int VRCompositor_WaitGetPoses(TrackedDevicePose.Buffer pRenderPoseArray, @Nullable TrackedDevicePose.Buffer pGamePoseArray)
Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to start rendering.
-
nVRCompositor_GetLastPoses
public static int nVRCompositor_GetLastPoses(long pRenderPoseArray, int unRenderPoseArrayCount, long pGamePoseArray, int unGamePoseArrayCount)Unsafe version of:GetLastPoses
-
VRCompositor_GetLastPoses
public static int VRCompositor_GetLastPoses(TrackedDevicePose.Buffer pRenderPoseArray, TrackedDevicePose.Buffer pGamePoseArray)
Get the last set of poses returned byWaitGetPoses.
-
nVRCompositor_GetLastPoseForTrackedDeviceIndex
public static int nVRCompositor_GetLastPoseForTrackedDeviceIndex(int unDeviceIndex, long pOutputPose, long pOutputGamePose)Unsafe version of:GetLastPoseForTrackedDeviceIndex
-
VRCompositor_GetLastPoseForTrackedDeviceIndex
public static int VRCompositor_GetLastPoseForTrackedDeviceIndex(int unDeviceIndex, @Nullable TrackedDevicePose pOutputPose, @Nullable TrackedDevicePose pOutputGamePose)Interface for accessing last set of poses returned byWaitGetPosesone at a time.It is okay to pass
NULLfor either pose if you only want one of the values.- Returns:
VR.EVRCompositorError_VRCompositorError_IndexOutOfRangeifunDeviceIndexnot less thanVR.k_unMaxTrackedDeviceCountotherwiseVR.EVRCompositorError_VRCompositorError_None
-
nVRCompositor_Submit
public static int nVRCompositor_Submit(int eEye, long pTexture, long pBounds, int nSubmitFlags)Unsafe version of:Submit
-
VRCompositor_Submit
public static int VRCompositor_Submit(int eEye, Texture pTexture, @Nullable VRTextureBounds pBounds, int nSubmitFlags)Updated scene texture to display.If
pBoundsisNULLthe entire texture will be used. If called from an OpenGL app, consider adding aglFlushafter submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames.OpenGL dirty state: glBindTexture
- Parameters:
eEye- one of:VR.EVREye_Eye_LeftVR.EVREye_Eye_RightnSubmitFlags- one of:VR.EVRSubmitFlags_Submit_DefaultVR.EVRSubmitFlags_Submit_LensDistortionAlreadyAppliedVR.EVRSubmitFlags_Submit_GlRenderBufferVR.EVRSubmitFlags_Submit_ReservedVR.EVRSubmitFlags_Submit_TextureWithDepth- Returns:
- return codes:
- IsNotSceneApplication (make sure to call VR_Init with VRApplication_Scene)
- DoNotHaveFocus (some other app has taken focus)
- TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo)
- SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device)
- TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.)
- InvalidTexture (usually means bad arguments passed in)
- AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again)
-
VRCompositor_ClearLastSubmittedFrame
public static void VRCompositor_ClearLastSubmittedFrame()
Clears the frame that was sent with the last call to Submit. This will cause the compositor to show the grid untilSubmitis called again.
-
VRCompositor_PostPresentHandoff
public static void VRCompositor_PostPresentHandoff()
Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor.This is an optional call, which only needs to be used if you can't instead call
WaitGetPosesimmediately afterPresent(). For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on.
-
nVRCompositor_GetFrameTiming
public static boolean nVRCompositor_GetFrameTiming(long pTiming, int unFramesAgo)Unsafe version of:GetFrameTiming
-
VRCompositor_GetFrameTiming
public static boolean VRCompositor_GetFrameTiming(CompositorFrameTiming.Buffer pTiming)
Returns true if timing data is filled it. Sets oldest timing info ifnFramesAgois larger than the stored history.Be sure to set
timing.size = sizeof(Compositor_FrameTiming)on struct passed in before calling this function.
-
nVRCompositor_GetFrameTimings
public static int nVRCompositor_GetFrameTimings(long pTiming, int nFrames)Unsafe version of:GetFrameTimings
-
VRCompositor_GetFrameTimings
public static int VRCompositor_GetFrameTimings(CompositorFrameTiming.Buffer pTiming)
Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. Only the first entry'sm_nSizeneeds to be set, as the rest will be inferred from that. Returns total number of entries filled out.
-
VRCompositor_GetFrameTimeRemaining
public static float VRCompositor_GetFrameTimeRemaining()
Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame.Due to "running start", this value may roll over to the next frame before ever reaching 0.0.
-
nVRCompositor_GetCumulativeStats
public static void nVRCompositor_GetCumulativeStats(long pStats, int nStatsSizeInBytes)Unsafe version of:GetCumulativeStats
-
VRCompositor_GetCumulativeStats
public static void VRCompositor_GetCumulativeStats(CompositorCumulativeStats pStats, int nStatsSizeInBytes)
Fills out stats accumulated for the last connected application.- Parameters:
nStatsSizeInBytes- must besizeof( Compositor_CumulativeStats )
-
VRCompositor_GetCumulativeStats
public static void VRCompositor_GetCumulativeStats(CompositorCumulativeStats pStats)
Fills out stats accumulated for the last connected application.
-
VRCompositor_FadeToColor
public static void VRCompositor_FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, boolean bBackground)Fades the view on the HMD to the specified color.The fade will take
fSeconds, and the color values are between 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly would beFadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space.
-
nVRCompositor_GetCurrentFadeColor
public static void nVRCompositor_GetCurrentFadeColor(boolean bBackground, long __functionAddress, long __result) public static void nVRCompositor_GetCurrentFadeColor(boolean bBackground, long __result)Unsafe version of:GetCurrentFadeColor
-
VRCompositor_GetCurrentFadeColor
public static HmdColor VRCompositor_GetCurrentFadeColor(boolean bBackground, HmdColor __result)
Get current fade color value.
-
VRCompositor_FadeGrid
public static void VRCompositor_FadeGrid(float fSeconds, boolean bFadeIn)Fading the Grid in or out infSeconds.
-
VRCompositor_GetCurrentGridAlpha
public static float VRCompositor_GetCurrentGridAlpha()
Get current alpha value of grid.
-
nVRCompositor_SetSkyboxOverride
public static int nVRCompositor_SetSkyboxOverride(long pTextures, int unTextureCount)Unsafe version of:SetSkyboxOverride
-
VRCompositor_SetSkyboxOverride
public static int VRCompositor_SetSkyboxOverride(Texture.Buffer pTextures)
Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough)Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. If two are passed, it is assumed a lat-long stereo pair.
-
VRCompositor_ClearSkyboxOverride
public static void VRCompositor_ClearSkyboxOverride()
Resets compositor skybox back to defaults.
-
VRCompositor_CompositorBringToFront
public static void VRCompositor_CompositorBringToFront()
Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD and is obscuring the compositor window.
-
VRCompositor_CompositorGoToBack
public static void VRCompositor_CompositorGoToBack()
Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD.
-
VRCompositor_CompositorQuit
public static void VRCompositor_CompositorQuit()
Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal circumstances the compositor will manage its own life cycle based on what applications are running.
-
VRCompositor_IsFullscreen
public static boolean VRCompositor_IsFullscreen()
Return whether the compositor is fullscreen.
-
VRCompositor_GetCurrentSceneFocusProcess
public static int VRCompositor_GetCurrentSceneFocusProcess()
Returns the process ID of the process that is currently rendering the scene.
-
VRCompositor_GetLastFrameRenderer
public static int VRCompositor_GetLastFrameRenderer()
Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame).- Returns:
- 0 when fading out from an app and the app's process Id when fading into an app
-
VRCompositor_CanRenderScene
public static boolean VRCompositor_CanRenderScene()
Returns true if the current process has the scene focus.
-
VRCompositor_ShowMirrorWindow
public static void VRCompositor_ShowMirrorWindow()
Opens the headset view (as either a window or docked widget depending on user's preferences) that displays what the user sees in the headset.
-
VRCompositor_HideMirrorWindow
public static void VRCompositor_HideMirrorWindow()
Closes the headset view, either as a window or docked widget.
-
VRCompositor_IsMirrorWindowVisible
public static boolean VRCompositor_IsMirrorWindowVisible()
Returns true if the headset view (either as a window or docked widget) is shown.
-
VRCompositor_CompositorDumpImages
public static void VRCompositor_CompositorDumpImages()
Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root.
-
VRCompositor_ShouldAppRenderWithLowResources
public static boolean VRCompositor_ShouldAppRenderWithLowResources()
Let an app know it should be rendering with low resources.
-
VRCompositor_ForceInterleavedReprojectionOn
public static void VRCompositor_ForceInterleavedReprojectionOn(boolean bOverride)
Override interleaved reprojection logic to force on.
-
VRCompositor_ForceReconnectProcess
public static void VRCompositor_ForceReconnectProcess()
Force reconnecting to the compositor process.
-
VRCompositor_SuspendRendering
public static void VRCompositor_SuspendRendering(boolean bSuspend)
Temporarily suspends rendering (useful for finer control over scene transitions).
-
nVRCompositor_GetMirrorTextureD3D11
public static int nVRCompositor_GetMirrorTextureD3D11(int eEye, long pD3D11DeviceOrResource, long ppD3D11ShaderResourceView)Unsafe version of:GetMirrorTextureD3D11
-
VRCompositor_GetMirrorTextureD3D11
public static int VRCompositor_GetMirrorTextureD3D11(int eEye, long pD3D11DeviceOrResource, org.lwjgl.PointerBuffer ppD3D11ShaderResourceView)Opens a shared D3D11 texture with the undistorted composited image for each eye.Use
ReleaseMirrorTextureD3D11when finished instead of calling Release on the resource itself.
-
VRCompositor_ReleaseMirrorTextureD3D11
public static void VRCompositor_ReleaseMirrorTextureD3D11(long pD3D11ShaderResourceView)
Releases a shared D3D11 texture.
-
nVRCompositor_GetMirrorTextureGL
public static int nVRCompositor_GetMirrorTextureGL(int eEye, long pglTextureId, long pglSharedTextureHandle)Unsafe version of:GetMirrorTextureGL
-
VRCompositor_GetMirrorTextureGL
public static int VRCompositor_GetMirrorTextureGL(int eEye, java.nio.IntBuffer pglTextureId, org.lwjgl.PointerBuffer pglSharedTextureHandle)Access to mirror textures from OpenGL.
-
VRCompositor_ReleaseSharedGLTexture
public static boolean VRCompositor_ReleaseSharedGLTexture(int glTextureId, long glSharedTextureHandle)
-
VRCompositor_LockGLSharedTextureForAccess
public static void VRCompositor_LockGLSharedTextureForAccess(long glSharedTextureHandle)
-
VRCompositor_UnlockGLSharedTextureForAccess
public static void VRCompositor_UnlockGLSharedTextureForAccess(long glSharedTextureHandle)
-
nVRCompositor_GetVulkanInstanceExtensionsRequired
public static int nVRCompositor_GetVulkanInstanceExtensionsRequired(long pchValue, int unBufferSize)Unsafe version of:GetVulkanInstanceExtensionsRequired
-
VRCompositor_GetVulkanInstanceExtensionsRequired
public static int VRCompositor_GetVulkanInstanceExtensionsRequired(@Nullable java.nio.ByteBuffer pchValue) public static java.lang.String VRCompositor_GetVulkanInstanceExtensionsRequired(int unBufferSize)Returns 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing null. The string will be a space separated list of-required instance extensions to enable inVkCreateInstance.
-
nVRCompositor_GetVulkanDeviceExtensionsRequired
public static int nVRCompositor_GetVulkanDeviceExtensionsRequired(long pPhysicalDevice, long pchValue, int unBufferSize)Unsafe version of:GetVulkanDeviceExtensionsRequired
-
VRCompositor_GetVulkanDeviceExtensionsRequired
public static int VRCompositor_GetVulkanDeviceExtensionsRequired(long pPhysicalDevice, @Nullable java.nio.ByteBuffer pchValue) public static java.lang.String VRCompositor_GetVulkanDeviceExtensionsRequired(long pPhysicalDevice, int unBufferSize)Returns 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing null. The string will be a space separated list of required device extensions to enable inVkCreateDevice.
-
VRCompositor_SetExplicitTimingMode
public static void VRCompositor_SetExplicitTimingMode(int eTimingMode)
Vulkan/D3D12 Only
There are two purposes for
SetExplicitTimingMode:- To get a more accurate GPU timestamp for when the frame begins in Vulkan/D3D12 applications.
- (Optional) To avoid having
WaitGetPosesaccess the Vulkan queue so that the queue can be accessed from another thread whileWaitGetPosesis executing.
More accurate GPU timestamp for the start of the frame is achieved by the application calling
SubmitExplicitTimingDataimmediately before its first submission to the Vulkan/D3D12 queue. This is more accurate because normally this GPU timestamp is recorded duringWaitGetPoses. In D3D11,WaitGetPosesqueues a GPU timestamp write, but it does not actually get submitted to the GPU until the application flushes. By usingSubmitExplicitTimingData, the timestamp is recorded at the same place for Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame.Avoiding
WaitGetPosesaccessing the Vulkan queue can be achieved usingSetExplicitTimingModeas well. If this is desired, the application should set the timing mode toVR.EVRCompositorTimingMode_VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoffand MUST callPostPresentHandoffitself. If these conditions are met, thenWaitGetPosesis guaranteed not to access the queue. Note thatPostPresentHandoffandSubmitExplicitTimingDatawill access the queue, so onlyWaitGetPosesbecomes safe for accessing the queue from another thread.
-
VRCompositor_SubmitExplicitTimingData
public static int VRCompositor_SubmitExplicitTimingData()
Vulkan/D3D12 Only
Submit explicit timing data. When
SetExplicitTimingModeis true, this must be called immediately before the application's firstvkQueueSubmit(Vulkan) orID3D12CommandQueue::ExecuteCommandLists(D3D12) of each frame. This function will insert a GPU timestamp write just before the application starts its rendering. This function will perform avkQueueSubmiton Vulkan so must not be done simultaneously withVkQueueoperations on another thread.- Returns:
VR.EVRCompositorError_VRCompositorError_RequestFailedifSetExplicitTimingModeis not enabled
-
VRCompositor_IsMotionSmoothingEnabled
public static boolean VRCompositor_IsMotionSmoothingEnabled()
Indicates whether or not motion smoothing is enabled by the user settings.If you want to know if motion smoothing actually triggered due to a late frame, check
CompositorFrameTimingm_nReprojectionFlags&VRCompositor_ReprojectionMotioninstead.
-
VRCompositor_IsMotionSmoothingSupported
public static boolean VRCompositor_IsMotionSmoothingSupported()
Indicates whether or not motion smoothing is supported by the current hardware.
-
VRCompositor_IsCurrentSceneFocusAppLoading
public static boolean VRCompositor_IsCurrentSceneFocusAppLoading()
Indicates whether or not the current scene focus app is currently loading.This is inferred from its use of
FadeGridto explicitly fade to the compositor to cover up the fact that it cannot render at a sustained full framerate during this time.
-
-