]> git.lizzy.rs Git - irrlicht.git/commitdiff
Fix line drawing: Explicitly draw both first & last pixel (#110)
authorLars Müller <34514239+appgurueu@users.noreply.github.com>
Sun, 16 Oct 2022 21:47:51 +0000 (23:47 +0200)
committerGitHub <noreply@github.com>
Sun, 16 Oct 2022 21:47:51 +0000 (23:47 +0200)
source/Irrlicht/COpenGLDriver.cpp

index c01ece63f03c8003808a4ea01459a7b30974b44e..b0f122b06fed53fc1c584d0f4d9f23483e146ae5 100644 (file)
@@ -1860,7 +1860,9 @@ void COpenGLDriver::draw2DLine(const core::position2d<s32>& start,
 \r
                glDrawElements(GL_LINES, 2, GL_UNSIGNED_SHORT, Quad2DIndices);\r
 \r
-               // Draw non-drawn last pixel (search for "diamond exit rule")\r
+               // Draw sometimes non-drawn first & last pixel (search for "diamond exit rule")\r
+               // HACK this messes with alpha blending\r
+               glDrawArrays(GL_POINTS, 0, 1);\r
                glDrawArrays(GL_POINTS, 1, 1);\r
        }\r
 }\r