1
0
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:
Zeno Rogue
2020-11-19 18:20:06 +01:00
parent 4444fa6bf1
commit 0de8ce9a10
16 changed files with 1315 additions and 49 deletions

View File

@@ -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;