From af0a76c19c671ebb613f12d99ebf6cef40bdd4a7 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 2 Jan 2020 02:59:31 +0100 Subject: [PATCH] Make edit mode entity ellipses more detailed --- src/engine/renderparticles.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/renderparticles.cpp b/src/engine/renderparticles.cpp index 3cbda972d..ab41677c8 100644 --- a/src/engine/renderparticles.cpp +++ b/src/engine/renderparticles.cpp @@ -1047,12 +1047,16 @@ struct loopprimitiverenderer : listrenderer void renderpart(loopprimitive *p, int blend, int ts, float size) { + // The number of polygon sides to use. + // The polygon rendering breaks if this is set too high. + const int detail = 40; + glBindTexture(GL_TEXTURE_2D, blanktexture->id); gle::colorub(p->color.r, p->color.g, p->color.b, uchar(p->blend*blend)); gle::begin(p->fill ? GL_TRIANGLE_FAN : GL_LINE_LOOP); - loopi(15 + (p->fill ? 1 : 0)) + loopi(detail + (p->fill ? 1 : 0)) { - const vec2 &sc = sincos360[i*(360/15)]; + const vec2 &sc = sincos360[i*(360/detail)]; vec v; switch(p->axis) {