diff --git a/3d-models.cpp b/3d-models.cpp index d64fb1c6..4f911df5 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -585,6 +585,7 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push, shDogStripes = shDogTorso; add_texture(shDogStripes); auto& utt = models_texture; + if(utt.tvertices.empty()) return; int a = (6 * 360 / step); for(int i=0; iid]; diff --git a/drawing.cpp b/drawing.cpp index ff221bd8..b37089c2 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -407,6 +407,12 @@ void coords_to_poly() { } } +bool behind3(hyperpoint h) { + if(pmodel == mdGeodesic) + h = lp_apply(inverse_exp(h, iTable)); + return h[2] < 0; + } + void addpoly(const transmatrix& V, const vector &tab, int ofs, int cnt) { if(pmodel == mdPixel) { for(int i=ofs; i &tab, int ofs, int cnt return; } tofix.clear(); knowgood = false; + if(among(pmodel, mdPerspective, mdGeodesic)) { + if(poly_flags & POLY_TRIANGLES) { + for(int i=ofs; istereo_active()) filledPolygonColorI(aux, polyxr, polyy, polyi, color); diff --git a/floorshapes.cpp b/floorshapes.cpp index 359ed96e..1dabc4f7 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -1086,6 +1086,7 @@ void draw_shape_for_texture(floorshape* sh) { /** copy the texture vertices so that there are at least qty of them */ EX void ensure_vertex_number(basic_textureinfo& bti, int qty) { int s = isize(bti.tvertices); + if(!s) return; while(isize(bti.tvertices) <= qty) { for(int i=0; i -BEHIND_LIMIT) tz = BEHIND_LIMIT; return tz; }