This partially reverts commits rBAfdebdd681f0b, rBA563ea27eb1a8 and rBAb56a6acb9f4f. And fixes T101134. We still need to find an appropriate way to replace `glEnable(GL_LINE_SMOOTH)`.