Blender  V2.93
Public Types | List of all members
GHOST_XrSession Class Reference

#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 ()
 

Detailed Description

Definition at line 33 of file GHOST_XrSession.h.

Member Enumeration Documentation

◆ LifeExpectancy

Enumerator
SESSION_KEEP_ALIVE 
SESSION_DESTROY 

Definition at line 35 of file GHOST_XrSession.h.

Constructor & Destructor Documentation

◆ GHOST_XrSession()

GHOST_XrSession::GHOST_XrSession ( GHOST_XrContext xr_context)

Definition at line 65 of file GHOST_XrSession.cpp.

◆ ~GHOST_XrSession()

GHOST_XrSession::~GHOST_XrSession ( )

Member Function Documentation

◆ draw()

void GHOST_XrSession::draw ( void *  draw_customdata)

Definition at line 338 of file GHOST_XrSession.cpp.

◆ handleStateChangeEvent()

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.

◆ isRunning()

bool GHOST_XrSession::isRunning ( ) const

Definition at line 463 of file GHOST_XrSession.cpp.

◆ needsUpsideDownDrawing()

bool GHOST_XrSession::needsUpsideDownDrawing ( ) const

Definition at line 451 of file GHOST_XrSession.cpp.

◆ requestEnd()

void GHOST_XrSession::requestEnd ( )

Definition at line 201 of file GHOST_XrSession.cpp.

◆ start()

void GHOST_XrSession::start ( const GHOST_XrSessionBeginInfo *  begin_info)

◆ unbindGraphicsContext()

void GHOST_XrSession::unbindGraphicsContext ( )

The documentation for this class was generated from the following files: