mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
glamor: explicitly draw endpoints of line segments
The OpenGL 4.6 specification §14.5.1 "Basic Line Rasterization"
figure 14.2 says:
"""A diamond shaped region of height 1 is placed around each fragment
center; those regions that the line segment **exits** cause
rasterization to produce corresponding fragments."""
As the line does not necessarily exit the last diamond,
it is necessary to explicitly paint a pixel at line ends.
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1434
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1755>
(cherry picked from commit 530e80375e)
This commit is contained in:
committed by
Alan Coopersmith
parent
7fe8901653
commit
e140707ade
@@ -115,6 +115,7 @@ glamor_poly_lines_solid_gl(DrawablePtr drawable, GCPtr gc,
|
||||
box->y2 - box->y1);
|
||||
box++;
|
||||
glDrawArrays(GL_LINE_STRIP, 0, n + add_last);
|
||||
glDrawArrays(GL_POINTS, 0, n + add_last);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user