aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Müller <34514239+appgurueu@users.noreply.github.com>2022-10-16 23:47:51 +0200
committerGitHub <noreply@github.com>2022-10-16 23:47:51 +0200
commite46ab74859bfaf57c87ea65fc67028bef3efafb2 (patch)
treec7dea8039fd2bc0b0768cbe2ac2851dfe6ebe206
parent57705d57cf1e91912427dde569850cda5de223f0 (diff)
downloadirrlicht-e46ab74859bfaf57c87ea65fc67028bef3efafb2.tar.xz
Fix line drawing: Explicitly draw both first & last pixel (#110)
-rw-r--r--source/Irrlicht/COpenGLDriver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp
index c01ece6..b0f122b 100644
--- a/source/Irrlicht/COpenGLDriver.cpp
+++ b/source/Irrlicht/COpenGLDriver.cpp
@@ -1860,7 +1860,9 @@ void COpenGLDriver::draw2DLine(const core::position2d<s32>& 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);
}
}