From e46ab74859bfaf57c87ea65fc67028bef3efafb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= <34514239+appgurueu@users.noreply.github.com> Date: Sun, 16 Oct 2022 23:47:51 +0200 Subject: [PATCH] Fix line drawing: Explicitly draw both first & last pixel (#110) --- source/Irrlicht/COpenGLDriver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp index c01ece63..b0f122b0 100644 --- a/source/Irrlicht/COpenGLDriver.cpp +++ b/source/Irrlicht/COpenGLDriver.cpp @@ -1860,7 +1860,9 @@ void COpenGLDriver::draw2DLine(const core::position2d& start, glDrawElements(GL_LINES, 2, GL_UNSIGNED_SHORT, Quad2DIndices); - // Draw non-drawn last pixel (search for "diamond exit rule") + // Draw sometimes non-drawn first & last pixel (search for "diamond exit rule") + // HACK this messes with alpha blending + glDrawArrays(GL_POINTS, 0, 1); glDrawArrays(GL_POINTS, 1, 1); } }