Fix line drawing: Explicitly draw both first & last pixel (#110)

This commit is contained in:
Lars Müller 2022-10-16 23:47:51 +02:00 committed by GitHub
parent 57705d57cf
commit e46ab74859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}