|
Blender
V2.93
|
#include <GHOST_XrSession.h>
Public Types | |
| enum | LifeExpectancy { SESSION_KEEP_ALIVE , SESSION_DESTROY } |
Public Member Functions | |
State Queries | |
| bool | isRunning () const |
Create, Initialize and Destruct | |
| GHOST_XrSession (GHOST_XrContext &xr_context) | |
| ~GHOST_XrSession () | |
State Management | |
| void | start (const GHOST_XrSessionBeginInfo *begin_info) |
| void | requestEnd () |
| LifeExpectancy | handleStateChangeEvent (const XrEventDataSessionStateChanged &lifecycle) |
Drawing | |
| bool | needsUpsideDownDrawing () const |
| void | draw (void *draw_customdata) |
Graphics Context Injection | |
Sessions need access to Ghost graphics context information. Additionally, this API allows creating contexts on the fly (created on start, destructed on end). For this, callbacks to bind (potentially create) and unbind (potentially destruct) a Ghost graphics context have to be set, which will be called on session start and end respectively. | |
| void | unbindGraphicsContext () |
Definition at line 33 of file GHOST_XrSession.h.
| Enumerator | |
|---|---|
| SESSION_KEEP_ALIVE | |
| SESSION_DESTROY | |
Definition at line 35 of file GHOST_XrSession.h.
| GHOST_XrSession::GHOST_XrSession | ( | GHOST_XrContext & | xr_context | ) |
Definition at line 65 of file GHOST_XrSession.cpp.
| GHOST_XrSession::~GHOST_XrSession | ( | ) |
Definition at line 70 of file GHOST_XrSession.cpp.
References CHECK_XR_ASSERT, GHOST_XrContext::getCustomFuncs(), GHOST_XrCustomFuncs::session_exit_customdata, GHOST_XrCustomFuncs::session_exit_fn, and unbindGraphicsContext().
| void GHOST_XrSession::draw | ( | void * | draw_customdata | ) |
Definition at line 338 of file GHOST_XrSession.cpp.
| GHOST_XrSession::LifeExpectancy GHOST_XrSession::handleStateChangeEvent | ( | const XrEventDataSessionStateChanged & | lifecycle | ) |
Definition at line 219 of file GHOST_XrSession.cpp.
References SESSION_DESTROY, and SESSION_KEEP_ALIVE.
| bool GHOST_XrSession::isRunning | ( | ) | const |
Definition at line 463 of file GHOST_XrSession.cpp.
| bool GHOST_XrSession::needsUpsideDownDrawing | ( | ) | const |
Definition at line 451 of file GHOST_XrSession.cpp.
| void GHOST_XrSession::requestEnd | ( | ) |
Definition at line 201 of file GHOST_XrSession.cpp.
| void GHOST_XrSession::start | ( | const GHOST_XrSessionBeginInfo * | begin_info | ) |
| void GHOST_XrSession::unbindGraphicsContext | ( | ) |
Definition at line 498 of file GHOST_XrSession.cpp.
References GHOST_XrContext::getCustomFuncs(), and GHOST_XrCustomFuncs::gpu_ctx_unbind_fn.
Referenced by ~GHOST_XrSession().