mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-30 15:39:54 +00:00
if outline is set and no texture, wireframes are drawn
This commit is contained in:
parent
eca6a77753
commit
b1e3b0cbdf
20
drawing.cpp
20
drawing.cpp
@ -668,11 +668,29 @@ void dqi_poly::gldraw() {
|
||||
}
|
||||
}
|
||||
|
||||
if(outline && !(flags & POLY_TRIANGLES)) {
|
||||
if(outline && !tinf) {
|
||||
glhr::color2(outline);
|
||||
glhr::set_depthtest(model_needs_depth() && prio < PPR::SUPERLINE);
|
||||
glhr::set_depthwrite(model_needs_depth() && prio != PPR::TRANSPARENT_SHADOW && prio != PPR::EUCLIDEAN_SKY);
|
||||
glhr::set_fogbase(prio == PPR::SKY ? 1.0 + (euclid ? 20 : 5 / sightranges[geometry]) : 1.0);
|
||||
|
||||
if(flags & POLY_TRIANGLES) {
|
||||
vector<glvertex> v1;
|
||||
v1.reserve(cnt * 2);
|
||||
for(int i=0; i<cnt; i+= 3) {
|
||||
v1.push_back(v[offset+i]);
|
||||
v1.push_back(v[offset+i+1]);
|
||||
v1.push_back(v[offset+i+1]);
|
||||
v1.push_back(v[offset+i+2]);
|
||||
v1.push_back(v[offset+i+2]);
|
||||
v1.push_back(v[offset+i]);
|
||||
}
|
||||
glhr::vertices(v1);
|
||||
glDrawArrays(GL_LINES, 0, cnt*2);
|
||||
// glDrawArrays(GL_LINE_STRIP, ioffset, cnt);
|
||||
}
|
||||
|
||||
else
|
||||
glDrawArrays(GL_LINE_STRIP, offset, cnt);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user