replace vrhr::state checking with nicer functions

This commit is contained in:
Zeno Rogue
2020-12-31 19:11:14 +01:00
parent 483ea3369b
commit e4e1a856e6
9 changed files with 57 additions and 49 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ bool need_many_cell_types() {
EX bool available() {
#if CAP_VR
/* would need a completely different implementation */
if(vrhr::state && vrhr::eyes == vrhr::eEyes::equidistant) return false;
if(vrhr::active() && vrhr::eyes == vrhr::eEyes::equidistant) return false;
#endif
if(noGUI) return false;
if(!vid.usingGL) return false;
@@ -1340,7 +1340,7 @@ EX void cast() {
cd->set_mask(global_projection);
#if CAP_VR
if(vrhr::state == 2) {
if(vrhr::rendering_eye()) {
glUniformMatrix4fv(o->uProjection, 1, 0, glhr::tmtogl_transpose3(vrhr::eyeproj).as_array());
}
#else