1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

3d:: depthtest disabled for PPR::SUPERLINE and beyond

This commit is contained in:
? 2019-02-27 01:16:07 +01:00 committed by Zeno Rogue
parent 4e6a50f425
commit aac03e72fe
3 changed files with 6 additions and 4 deletions

View File

@ -5364,7 +5364,7 @@ void queuecircleat(cell *c, double rad, color_t col) {
dynamicval<color_t> p(poly_outline, col);
for(int i=0; i<c->type; i++) {
if(binarytiling && i < 4) continue;
queuepolyat(gmatrix[c], shBinaryWall[i], 0, PPR::LINE);
queuepolyat(gmatrix[c], shBinaryWall[i], 0, PPR::SUPERLINE);
}
return;
}

View File

@ -2074,7 +2074,9 @@ enum class PPR {
PARTICLE, SWORDMARK, MAGICSWORD, MISSILE,
MINEMARK, ARROW,
MOBILE_ARROW,
LINE, TEXT, CIRCLE,
LINE,
// no depth testing for SUPERLINE and above
SUPERLINE, TEXT, CIRCLE,
MAX,
DEFAULT = -1
};

View File

@ -608,7 +608,7 @@ void dqi_poly::gldraw() {
current_display->set_mask(ed);
glhr::color2(color);
glhr::set_depthtest(model_needs_depth());
glhr::set_depthtest(model_needs_depth() && prio < PPR::SUPERLINE);
if(flags & (POLY_INVERSE | POLY_FORCE_INVERTED)) {
glStencilOp( GL_ZERO, GL_ZERO, GL_ZERO);
@ -640,7 +640,7 @@ void dqi_poly::gldraw() {
if(outline) {
glhr::color2(outline);
glhr::set_depthtest(model_needs_depth());
glhr::set_depthtest(model_needs_depth() && prio < PPR::SUPERLINE);
glDrawArrays(GL_LINE_STRIP, offset, cnt);
}
}