- CanRenderScene
bool CanRenderScene()
Undocumented in source.
- ClearLastSubmittedFrame
void ClearLastSubmittedFrame()
Undocumented in source.
- ClearSkyboxOverride
void ClearSkyboxOverride()
Undocumented in source.
- ClearStageOverride
void ClearStageOverride()
Undocumented in source.
- CompositorBringToFront
void CompositorBringToFront()
Undocumented in source.
- CompositorDumpImages
void CompositorDumpImages()
Undocumented in source.
- CompositorGoToBack
void CompositorGoToBack()
Undocumented in source.
- CompositorQuit
void CompositorQuit()
Undocumented in source.
- FadeGrid
void FadeGrid(float fSeconds, bool bFadeIn)
Undocumented in source.
- FadeToColor
void FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground)
Undocumented in source.
- ForceInterleavedReprojectionOn
void ForceInterleavedReprojectionOn(bool bOverride)
Undocumented in source.
- ForceReconnectProcess
void ForceReconnectProcess()
Undocumented in source.
- GetCompositorBenchmarkResults
bool GetCompositorBenchmarkResults(Compositor_BenchmarkResults* pBenchmarkResults, uint nSizeOfBenchmarkResults)
Undocumented in source.
- GetCumulativeStats
void GetCumulativeStats(Compositor_CumulativeStats* pStats, uint nStatsSizeInBytes)
Undocumented in source.
- GetCurrentFadeColor
HmdColor_t GetCurrentFadeColor(bool bBackground)
Undocumented in source.
- GetCurrentGridAlpha
float GetCurrentGridAlpha()
Undocumented in source.
- GetCurrentSceneFocusProcess
uint GetCurrentSceneFocusProcess()
Undocumented in source.
- GetFrameTimeRemaining
float GetFrameTimeRemaining()
Undocumented in source.
- GetFrameTiming
bool GetFrameTiming(Compositor_FrameTiming* pTiming, uint unFramesAgo)
Undocumented in source.
- GetFrameTimings
uint GetFrameTimings(Compositor_FrameTiming* pTiming, uint nFrames)
Undocumented in source.
- GetLastFrameRenderer
uint GetLastFrameRenderer()
Undocumented in source.
- GetLastPoseForTrackedDeviceIndex
EVRCompositorError GetLastPoseForTrackedDeviceIndex(TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t* pOutputPose, TrackedDevicePose_t* pOutputGamePose)
Interface for accessing last set of poses returned by WaitGetPoses one at a time.
Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None.
It is okay to pass NULL for either pose if you only want one of the values.
- GetLastPosePredictionIDs
EVRCompositorError GetLastPosePredictionIDs(uint* pRenderPosePredictionID, uint* pGamePosePredictionID)
Undocumented in source.
- GetLastPoses
EVRCompositorError GetLastPoses(TrackedDevicePose_t* pRenderPoseArray, uint unRenderPoseArrayCount, TrackedDevicePose_t* pGamePoseArray, uint unGamePoseArrayCount)
Undocumented in source.
- GetMirrorTextureD3D11
EVRCompositorError GetMirrorTextureD3D11(EVREye eEye, void* pD3D11DeviceOrResource, void** ppD3D11ShaderResourceView)
Undocumented in source.
- GetMirrorTextureGL
EVRCompositorError GetMirrorTextureGL(EVREye eEye, glUInt_t* pglTextureId, glSharedTextureHandle_t* pglSharedTextureHandle)
Undocumented in source.
- GetPosesForFrame
EVRCompositorError GetPosesForFrame(uint unPosePredictionID, TrackedDevicePose_t* pPoseArray, uint unPoseArrayCount)
Undocumented in source.
- GetTrackingSpace
ETrackingUniverseOrigin GetTrackingSpace()
Undocumented in source.
- GetVulkanDeviceExtensionsRequired
uint GetVulkanDeviceExtensionsRequired(VkPhysicalDevice_T pPhysicalDevice, char* pchValue, uint unBufferSize)
[Vulkan only]
return 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 in VkCreateDevice
- GetVulkanInstanceExtensionsRequired
uint GetVulkanInstanceExtensionsRequired(char* pchValue, uint unBufferSize)
[Vulkan Only]
return 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 in VkCreateInstance
- HideMirrorWindow
void HideMirrorWindow()
Undocumented in source.
- IsCurrentSceneFocusAppLoading
bool IsCurrentSceneFocusAppLoading()
Undocumented in source.
- IsFullscreen
bool IsFullscreen()
Undocumented in source.
- IsMirrorWindowVisible
bool IsMirrorWindowVisible()
Undocumented in source.
- IsMotionSmoothingEnabled
bool IsMotionSmoothingEnabled()
Undocumented in source.
- IsMotionSmoothingSupported
bool IsMotionSmoothingSupported()
Undocumented in source.
- LockGLSharedTextureForAccess
void LockGLSharedTextureForAccess(glSharedTextureHandle_t glSharedTextureHandle)
Undocumented in source.
- PostPresentHandoff
void PostPresentHandoff()
Undocumented in source.
- ReleaseMirrorTextureD3D11
void ReleaseMirrorTextureD3D11(void* pD3D11ShaderResourceView)
Undocumented in source.
- ReleaseSharedGLTexture
bool ReleaseSharedGLTexture(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle)
Undocumented in source.
- SetExplicitTimingMode
void SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode)
[ Vulkan/D3D12 Only ]
There are two purposes for SetExplicitTimingMode:
1. To get a more accurate GPU timestamp for when the frame begins in Vulkan/D3D12 applications.
2. (Optional) To avoid having WaitGetPoses access the Vulkan queue so that the queue can be accessed from
another thread while WaitGetPoses is executing.
More accurate GPU timestamp for the start of the frame is achieved by the application calling SubmitExplicitTimingData immediately before its first submission to the Vulkan/D3D12 queue. This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11, WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the application flushes. By using SubmitExplicitTimingData, 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 WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired, the application should set the timing mode to Explicit_ApplicationPerformsPostPresentHandoff and *MUSTcall PostPresentHandoff itself. If these conditions are met, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff and SubmitExplicitTimingData will access the queue, so only WaitGetPoses becomes safe for accessing the queue from another thread.
- SetSkyboxOverride
EVRCompositorError SetSkyboxOverride(const(Texture_t)* pTextures, uint unTextureCount)
Undocumented in source.
- SetStageOverride_Async
EVRCompositorError SetStageOverride_Async(const(char)* pchRenderModelPath, const(HmdMatrix34_t)* pTransform, const(Compositor_StageRenderSettings)* pRenderSettings, uint nSizeOfRenderSettings)
Undocumented in source.
- SetTrackingSpace
void SetTrackingSpace(ETrackingUniverseOrigin eOrigin)
Undocumented in source.
- ShouldAppRenderWithLowResources
bool ShouldAppRenderWithLowResources()
Undocumented in source.
- ShowMirrorWindow
void ShowMirrorWindow()
Undocumented in source.
- Submit
EVRCompositorError Submit(EVREye eEye, const(Texture_t)* pTexture, const(VRTextureBounds_t)* pBounds, EVRSubmitFlags nSubmitFlags)
Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after 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
Return codes:
- IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_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)
- SubmitExplicitTimingData
EVRCompositorError SubmitExplicitTimingData()
[ Vulkan/D3D12 Only ]
Submit explicit timing data. When SetExplicitTimingMode is true, this must be called immediately before the application's first vkQueueSubmit (Vulkan) or ID3D12CommandQueue::ExecuteCommandLists (D3D12) of each frame. This function will insert a GPU timestamp write just before the application starts its rendering. This function will perform a vkQueueSubmit on Vulkan so must not be done simultaneously with VkQueue operations on another thread. Returns VRCompositorError_RequestFailed if SetExplicitTimingMode is not enabled.
- SuspendRendering
void SuspendRendering(bool bSuspend)
Undocumented in source.
- UnlockGLSharedTextureForAccess
void UnlockGLSharedTextureForAccess(glSharedTextureHandle_t glSharedTextureHandle)
Undocumented in source.
- WaitGetPoses
EVRCompositorError WaitGetPoses(TrackedDevicePose_t* pRenderPoseArray, uint unRenderPoseArrayCount, TrackedDevicePose_t* pGamePoseArray, uint unGamePoseArrayCount)
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.
Return codes:
- IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene)
- DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app)