From b1e3b0cbdf5e360801f255740b828087ffc3d546 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 6 Apr 2020 11:25:55 +0200 Subject: [PATCH] if outline is set and no texture, wireframes are drawn --- drawing.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drawing.cpp b/drawing.cpp index 60de8e0f..96c7df15 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -668,12 +668,30 @@ 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); - glDrawArrays(GL_LINE_STRIP, offset, cnt); + + if(flags & POLY_TRIANGLES) { + vector v1; + v1.reserve(cnt * 2); + for(int i=0; i