Decrese core-line width when overdrawing to preserve original line width.

This commit is contained in:
vrld
2011-12-30 14:09:26 +01:00
parent 3b01da803e
commit 9c9b1810b7
+5
View File
@@ -859,6 +859,11 @@ namespace opengl
float halfwidth = lineWidth/2.f;
float inv_hw = 1.f / halfwidth;
// Overdraw changes visible line width. account for that.
// Value of 0.15 chosen empirically.
if (lineStyle == LINE_SMOOTH)
halfwidth -= .15f;
// get line vertex boundaries
// if not looping, extend the line at the beginning, else use last point as `p'
r = Vector(coords[0], coords[1]);