Fix lines converting to squares

This commit is contained in:
LightCat 2018-11-04 11:49:46 +01:00
parent 9457ea150e
commit efe9d109b9

View File

@ -149,7 +149,7 @@ void line(float x, float y, float dx, float dy, rgba color, float thickness)
float ex = x + dx;
float ey = y + dy;
if (length == 0)
if (!length <= 0.1f)
return;
nx /= length;
@ -310,4 +310,4 @@ void rect_textured(float x, float y, float w, float h, rgba color, texture &text
ftgl::vertex_buffer_push_back(detail::program::buffer, vertices, 4,
indices::rectangle, 6);
}
}
}