1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-20 09:59:50 +00:00

replace vrhr::state checking with nicer functions

This commit is contained in:
Zeno Rogue
2020-12-30 14:20:30 +01:00
parent 483ea3369b
commit e4e1a856e6
9 changed files with 57 additions and 49 deletions

15
vr.cpp
View File

@@ -10,8 +10,23 @@ namespace hr {
EX namespace vrhr {
#if !CAP_VR
inline bool active() { return false; }
inline bool rendering() { return false; }
inline bool rendering_eye() { return false; }
#endif
#if CAP_VR
/** VR is active */
EX bool active() { return state; }
/** called in drawqueue to see if we should switch to vrhr::render() */
EX bool should_render() { return state == 1; }
/** currently rendering a VR-aware screen */
EX bool rendering() { return state == 2 || state == 4; }
/** currently rendering a VR eye */
EX bool rendering_eye() { return state == 2; }
#if HDR
enum class eHeadset { none, rotation_only, reference, holonomy, model_viewing };
enum class eEyes { none, equidistant, truesim };