mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
fixed a bug with infront graphics (caused by draw() changing the parameter)
This commit is contained in:
parent
eb23dce2aa
commit
a74a73cac1
29
polygons.cpp
29
polygons.cpp
@ -960,22 +960,25 @@ void dqi_poly::draw() {
|
|||||||
for(int i=0; i<cnt; i++)
|
for(int i=0; i<cnt; i++)
|
||||||
tv.push_back(tinf->tvertices[offset+i]);
|
tv.push_back(tinf->tvertices[offset+i]);
|
||||||
swap(tinf->tvertices, tv);
|
swap(tinf->tvertices, tv);
|
||||||
V = Id;
|
dqi_poly npoly = (*this);
|
||||||
tab = &glcoords;
|
npoly.V = Id;
|
||||||
offset = 0;
|
npoly.tab = &glcoords;
|
||||||
cnt = isize(glcoords);
|
npoly.offset = 0;
|
||||||
flags = poly_flags;
|
npoly.cnt = isize(glcoords);
|
||||||
gldraw();
|
npoly.flags = poly_flags;
|
||||||
|
npoly.gldraw();
|
||||||
swap(tinf->tvertices, tv);
|
swap(tinf->tvertices, tv);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
V = Id;
|
dqi_poly npoly = (*this);
|
||||||
tab = &glcoords;
|
npoly.V = Id;
|
||||||
offset = 0;
|
npoly.tab = &glcoords;
|
||||||
cnt = isize(glcoords);
|
npoly.offset = 0;
|
||||||
if(nofill) color = 0, tinf = NULL;
|
npoly.cnt = isize(glcoords);
|
||||||
flags = poly_flags;
|
npoly.flags = poly_flags;
|
||||||
gldraw();
|
npoly.gldraw();
|
||||||
|
if(nofill) npoly.color = 0, npoly.tinf = NULL;
|
||||||
|
npoly.gldraw();
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user