1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-23 13:43:19 +00:00

draw textured spheres correctly

This commit is contained in:
Zeno Rogue 2018-04-06 12:19:36 +02:00
parent 228f677e00
commit 7b4061829e

View File

@ -607,7 +607,16 @@ void drawpolyline(polytodraw& p) {
return;
}
glLineWidth(linewidthat(tC0(pp.V), pp.minwidth));
gldraw(3, Id, glcoords, 0, size(glcoords), p.col, pp.outline, poly_flags, pp.tinf);
if(pp.tinf && pp.offset) {
vector<glvertex> tv;
for(int i=0; i<pp.cnt; i++)
tv.push_back(pp.tinf->tvertices[pp.offset+i]);
swap(pp.tinf->tvertices, tv);
gldraw(3, Id, glcoords, 0, size(glcoords), p.col, pp.outline, poly_flags, pp.tinf);
swap(pp.tinf->tvertices, tv);
}
else
gldraw(3, Id, glcoords, 0, size(glcoords), p.col, pp.outline, poly_flags, pp.tinf);
continue;
}
#endif