mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-22 08:14:07 +00:00
correct transparent wall ordering in S^3 [untested]
This commit is contained in:
parent
923d94e463
commit
5fed2d84ee
@ -1507,6 +1507,11 @@ void draw_backside() {
|
|||||||
|
|
||||||
extern bool lshiftclick, lctrlclick;
|
extern bool lshiftclick, lctrlclick;
|
||||||
|
|
||||||
|
void reverse_transparent_walls() {
|
||||||
|
int pt = int(PPR::TRANSPARENT_WALL);
|
||||||
|
reverse(&ptds[qp0[pt]], &ptds[qp[pt]]);
|
||||||
|
}
|
||||||
|
|
||||||
void draw_main() {
|
void draw_main() {
|
||||||
if(sphere && DIM == 3 && pmodel == mdPerspective) {
|
if(sphere && DIM == 3 && pmodel == mdPerspective) {
|
||||||
for(int p: {1, 0, 2, 3}) {
|
for(int p: {1, 0, 2, 3}) {
|
||||||
@ -1527,6 +1532,7 @@ void draw_main() {
|
|||||||
glClearDepth(0.0f);
|
glClearDepth(0.0f);
|
||||||
#endif
|
#endif
|
||||||
glDepthFunc(GL_GEQUAL);
|
glDepthFunc(GL_GEQUAL);
|
||||||
|
reverse_transparent_walls();
|
||||||
}
|
}
|
||||||
glClear(GL_DEPTH_BUFFER_BIT);
|
glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
glhr::be_nontextured();
|
glhr::be_nontextured();
|
||||||
@ -1538,6 +1544,7 @@ void draw_main() {
|
|||||||
reset_projection();
|
reset_projection();
|
||||||
for(auto& ptd: ptds) ptd->draw();
|
for(auto& ptd: ptds) ptd->draw();
|
||||||
}
|
}
|
||||||
|
if(p == 1 || p == 2) reverse_transparent_walls();
|
||||||
// glflush();
|
// glflush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user