Monado OpenXR Runtime
oxr_frame_sync Struct Reference

Helper that handles synchronizing the xr{Wait,Begin,End}Frame calls. More...

#include <oxr/oxr_frame_sync.h>

Collaboration diagram for oxr_frame_sync:

Public Member Functions

int oxr_frame_sync_init (struct oxr_frame_sync *ofs)
 Initialize the frame sync helper. More...
 
XRT_CHECK_RESULT XrResult oxr_frame_sync_wait_frame (struct oxr_frame_sync *ofs)
 Handle mutual exclusion in xrWaitFrame w.r.t. More...
 
XRT_CHECK_RESULT XrResult oxr_frame_sync_release (struct oxr_frame_sync *ofs)
 Release at most one blocked xrWaitFrame to run, e.g. More...
 
XRT_CHECK_RESULT XrResult oxr_frame_sync_begin_session (struct oxr_frame_sync *ofs)
 Begin the session, resetting state accordingly. More...
 
XRT_CHECK_RESULT XrResult oxr_frame_sync_end_session (struct oxr_frame_sync *ofs)
 End the session. More...
 
XRT_CHECK_RESULT bool oxr_frame_sync_is_session_running (struct oxr_frame_sync *ofs)
 Is the session running?. More...
 
void oxr_frame_sync_fini (struct oxr_frame_sync *ofs)
 Clean up. More...
 

Data Fields

pthread_mutex_t mutex
 
pthread_cond_t cond
 
bool canWaitFrameReturn
 
bool initialized
 
bool running
 

Detailed Description

Helper that handles synchronizing the xr{Wait,Begin,End}Frame calls.

Member Function Documentation

◆ oxr_frame_sync_begin_session()

XRT_CHECK_RESULT XrResult oxr_frame_sync_begin_session ( struct oxr_frame_sync ofs)

Begin the session, resetting state accordingly.

Referenced by oxr_session_begin().

◆ oxr_frame_sync_end_session()

XRT_CHECK_RESULT XrResult oxr_frame_sync_end_session ( struct oxr_frame_sync ofs)

End the session.

◆ oxr_frame_sync_fini()

void oxr_frame_sync_fini ( struct oxr_frame_sync ofs)

Clean up.

◆ oxr_frame_sync_init()

int oxr_frame_sync_init ( struct oxr_frame_sync ofs)

Initialize the frame sync helper.

References U_ZERO.

◆ oxr_frame_sync_is_session_running()

XRT_CHECK_RESULT bool oxr_frame_sync_is_session_running ( struct oxr_frame_sync ofs)

Is the session running?.

◆ oxr_frame_sync_release()

XRT_CHECK_RESULT XrResult oxr_frame_sync_release ( struct oxr_frame_sync ofs)

Release at most one blocked xrWaitFrame to run, e.g.

from xrBeginFrame.

◆ oxr_frame_sync_wait_frame()

XRT_CHECK_RESULT XrResult oxr_frame_sync_wait_frame ( struct oxr_frame_sync ofs)

Handle mutual exclusion in xrWaitFrame w.r.t.

xrBeginFrame


The documentation for this struct was generated from the following file: