mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-05 19:22:48 +00:00
2.5D: deleteSky
This commit is contained in:
parent
852dc94fad
commit
70421ed506
12
sky.cpp
12
sky.cpp
@ -57,9 +57,14 @@ EX void prepare_sky() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<glhr::colored_vertex> skyvertices;
|
EX vector<glhr::colored_vertex> skyvertices;
|
||||||
cell *sky_centerover;
|
EX cell *sky_centerover;
|
||||||
shiftmatrix sky_cview;
|
EX shiftmatrix sky_cview;
|
||||||
|
|
||||||
|
EX void delete_sky() {
|
||||||
|
sky_centerover = nullptr;
|
||||||
|
skyvertices.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void compute_skyvertices(const vector<sky_item>& sky) {
|
void compute_skyvertices(const vector<sky_item>& sky) {
|
||||||
skyvertices.clear();
|
skyvertices.clear();
|
||||||
@ -259,6 +264,7 @@ void compute_skyvertices(const vector<sky_item>& sky) {
|
|||||||
|
|
||||||
void dqi_sky::draw() {
|
void dqi_sky::draw() {
|
||||||
if(!vid.usingGL || sky.empty() || skyvertices.empty()) return;
|
if(!vid.usingGL || sky.empty() || skyvertices.empty()) return;
|
||||||
|
if(!draw_sky) { delete_sky(); return; }
|
||||||
|
|
||||||
#if CAP_VR
|
#if CAP_VR
|
||||||
transmatrix s = (vrhr::rendering() ? vrhr::master_cview : cview()).T * inverse(sky_cview.T);
|
transmatrix s = (vrhr::rendering() ? vrhr::master_cview : cview()).T * inverse(sky_cview.T);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user