2018-01-18 13:29:49 -06:00
|
|
|
#include "vrclient_private.h"
|
|
|
|
#include "vrclient_defs.h"
|
|
|
|
#include "openvr_v0.9.14/openvr.h"
|
|
|
|
using namespace vr;
|
|
|
|
extern "C" {
|
|
|
|
#include "struct_converters.h"
|
|
|
|
}
|
|
|
|
#include "cppIVRCompositor_IVRCompositor_010.h"
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2023-09-28 10:22:41 +02:00
|
|
|
|
|
|
|
struct cppIVRCompositor_IVRCompositor_010
|
|
|
|
{
|
|
|
|
#ifdef __cplusplus
|
|
|
|
virtual void SetTrackingSpace( uint32_t ) = 0;
|
|
|
|
virtual uint32_t GetTrackingSpace( ) = 0;
|
|
|
|
virtual uint32_t WaitGetPoses( TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t ) = 0;
|
|
|
|
virtual uint32_t GetLastPoses( TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t ) = 0;
|
|
|
|
virtual uint32_t Submit( uint32_t, const Texture_t *, const VRTextureBounds_t *, uint32_t ) = 0;
|
|
|
|
virtual void ClearLastSubmittedFrame( ) = 0;
|
|
|
|
virtual void PostPresentHandoff( ) = 0;
|
|
|
|
virtual bool GetFrameTiming( Compositor_FrameTiming *, uint32_t ) = 0;
|
|
|
|
virtual float GetFrameTimeRemaining( ) = 0;
|
|
|
|
virtual void FadeToColor( float, float, float, float, float, bool ) = 0;
|
|
|
|
virtual void FadeGrid( float, bool ) = 0;
|
|
|
|
virtual uint32_t SetSkyboxOverride( const Texture_t *, uint32_t ) = 0;
|
|
|
|
virtual void ClearSkyboxOverride( ) = 0;
|
|
|
|
virtual void CompositorBringToFront( ) = 0;
|
|
|
|
virtual void CompositorGoToBack( ) = 0;
|
|
|
|
virtual void CompositorQuit( ) = 0;
|
|
|
|
virtual bool IsFullscreen( ) = 0;
|
|
|
|
virtual uint32_t GetCurrentSceneFocusProcess( ) = 0;
|
|
|
|
virtual uint32_t GetLastFrameRenderer( ) = 0;
|
|
|
|
virtual bool CanRenderScene( ) = 0;
|
|
|
|
virtual void ShowMirrorWindow( ) = 0;
|
|
|
|
virtual void HideMirrorWindow( ) = 0;
|
|
|
|
virtual bool IsMirrorWindowVisible( ) = 0;
|
|
|
|
virtual void CompositorDumpImages( ) = 0;
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
};
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_SetTrackingSpace( struct cppIVRCompositor_IVRCompositor_010_SetTrackingSpace_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->SetTrackingSpace( params->eOrigin );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_GetTrackingSpace( struct cppIVRCompositor_IVRCompositor_010_GetTrackingSpace_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetTrackingSpace( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_WaitGetPoses( struct cppIVRCompositor_IVRCompositor_010_WaitGetPoses_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->WaitGetPoses( params->pRenderPoseArray, params->unRenderPoseArrayCount, params->pGamePoseArray, params->unGamePoseArrayCount );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_GetLastPoses( struct cppIVRCompositor_IVRCompositor_010_GetLastPoses_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetLastPoses( params->pRenderPoseArray, params->unRenderPoseArrayCount, params->pGamePoseArray, params->unGamePoseArrayCount );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_Submit( struct cppIVRCompositor_IVRCompositor_010_Submit_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->Submit( params->eEye, params->pTexture, params->pBounds, params->nSubmitFlags );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame( struct cppIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->ClearLastSubmittedFrame( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_PostPresentHandoff( struct cppIVRCompositor_IVRCompositor_010_PostPresentHandoff_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->PostPresentHandoff( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_GetFrameTiming( struct cppIVRCompositor_IVRCompositor_010_GetFrameTiming_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
2023-09-27 14:09:21 +02:00
|
|
|
Compositor_FrameTiming lin_pTiming;
|
2023-09-27 11:05:52 +02:00
|
|
|
if (params->pTiming)
|
|
|
|
struct_Compositor_FrameTiming_0914_win_to_lin( params->pTiming, &lin_pTiming );
|
2023-09-28 10:22:41 +02:00
|
|
|
params->_ret = iface->GetFrameTiming( params->pTiming ? &lin_pTiming : nullptr, params->unFramesAgo );
|
2023-09-27 11:05:52 +02:00
|
|
|
if (params->pTiming)
|
|
|
|
struct_Compositor_FrameTiming_0914_lin_to_win( &lin_pTiming, params->pTiming );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining( struct cppIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetFrameTimeRemaining( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_FadeToColor( struct cppIVRCompositor_IVRCompositor_010_FadeToColor_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->FadeToColor( params->fSeconds, params->fRed, params->fGreen, params->fBlue, params->fAlpha, params->bBackground );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_FadeGrid( struct cppIVRCompositor_IVRCompositor_010_FadeGrid_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->FadeGrid( params->fSeconds, params->bFadeIn );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_SetSkyboxOverride( struct cppIVRCompositor_IVRCompositor_010_SetSkyboxOverride_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->SetSkyboxOverride( params->pTextures, params->unTextureCount );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_ClearSkyboxOverride( struct cppIVRCompositor_IVRCompositor_010_ClearSkyboxOverride_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->ClearSkyboxOverride( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_CompositorBringToFront( struct cppIVRCompositor_IVRCompositor_010_CompositorBringToFront_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->CompositorBringToFront( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_CompositorGoToBack( struct cppIVRCompositor_IVRCompositor_010_CompositorGoToBack_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->CompositorGoToBack( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_CompositorQuit( struct cppIVRCompositor_IVRCompositor_010_CompositorQuit_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->CompositorQuit( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_IsFullscreen( struct cppIVRCompositor_IVRCompositor_010_IsFullscreen_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->IsFullscreen( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess( struct cppIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetCurrentSceneFocusProcess( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_GetLastFrameRenderer( struct cppIVRCompositor_IVRCompositor_010_GetLastFrameRenderer_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetLastFrameRenderer( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_CanRenderScene( struct cppIVRCompositor_IVRCompositor_010_CanRenderScene_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->CanRenderScene( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_ShowMirrorWindow( struct cppIVRCompositor_IVRCompositor_010_ShowMirrorWindow_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->ShowMirrorWindow( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_HideMirrorWindow( struct cppIVRCompositor_IVRCompositor_010_HideMirrorWindow_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->HideMirrorWindow( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible( struct cppIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
params->_ret = iface->IsMirrorWindowVisible( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
2023-09-27 11:05:52 +02:00
|
|
|
void cppIVRCompositor_IVRCompositor_010_CompositorDumpImages( struct cppIVRCompositor_IVRCompositor_010_CompositorDumpImages_params *params )
|
2018-01-18 13:29:49 -06:00
|
|
|
{
|
2023-09-28 10:22:41 +02:00
|
|
|
struct cppIVRCompositor_IVRCompositor_010 *iface = (struct cppIVRCompositor_IVRCompositor_010 *)params->linux_side;
|
|
|
|
iface->CompositorDumpImages( );
|
2018-01-18 13:29:49 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|