mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-31 01:37:57 +00:00
initial implementation of VR
This commit is contained in:
6
rug.cpp
6
rug.cpp
@@ -1021,6 +1021,9 @@ EX void prepareTexture() {
|
||||
|
||||
dynamicval<eStereo> d(vid.stereo_mode, sOFF);
|
||||
dynamicval<ld> dl(levellines, 0);
|
||||
#if CAP_VR
|
||||
dynamicval<int> i(vrhr::state, 0);
|
||||
#endif
|
||||
calcparam_rug();
|
||||
models::configure();
|
||||
|
||||
@@ -1084,6 +1087,9 @@ EX void drawRugScene() {
|
||||
|
||||
auto& rug = queuecurve(shiftless(Id), 0, 0xFFFFFFFF, PPR::LINE);
|
||||
|
||||
dynamicval<transmatrix> tV(View, View);
|
||||
View = Id; /* needed for vr */
|
||||
|
||||
if(nonisotropic) {
|
||||
transmatrix T2 = eupush( tC0(view_inverse(rugView)) );
|
||||
NLP = rugView * T2;
|
||||
|
Reference in New Issue
Block a user