[0.16.6] [nvidia, linux] glitch in gui tabs due to non-integer Y coordinates
Posted: Thu Dec 21, 2017 5:07 pm
Hello,
this is on linux with nvidia driver.
GUI tabs have their top horizontal line offset by 1. This is visible when using nvidia's GL lib, but not with mesa:
https://imgur.com/a/JeNQt (nv above, mesa/intel below)
Turns out, to draw the line, factorio uses a triangle fan to render a line (credit goes to Arthur Huillet of nvidia for digging that out):
glVertexPointer(3, GL_FLOAT, 36, { [489, 88.5, 0], [489, 89.5, 0] , [549, 89.5, 0])
glDrawArrays(GL_TRIANGLE_FAN, 0, 4)
Wit the nvidia GL lib, the line ends up at Y coordinate 89, which is valid for a triangle (not a line) given the non-integer Y coordinates, but mesa renders it at 88 (which is a bug in mesa/intel).
this is on linux with nvidia driver.
GUI tabs have their top horizontal line offset by 1. This is visible when using nvidia's GL lib, but not with mesa:
https://imgur.com/a/JeNQt (nv above, mesa/intel below)
Turns out, to draw the line, factorio uses a triangle fan to render a line (credit goes to Arthur Huillet of nvidia for digging that out):
glVertexPointer(3, GL_FLOAT, 36, { [489, 88.5, 0], [489, 89.5, 0] , [549, 89.5, 0])
glDrawArrays(GL_TRIANGLE_FAN, 0, 4)
Wit the nvidia GL lib, the line ends up at Y coordinate 89, which is valid for a triangle (not a line) given the non-integer Y coordinates, but mesa renders it at 88 (which is a bug in mesa/intel).