[0.16.6] [nvidia, linux] glitch in gui tabs due to non-integer Y coordinates

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
roarinelk
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Dec 21, 2017 3:20 pm
Contact:

[0.16.6] [nvidia, linux] glitch in gui tabs due to non-integer Y coordinates

Post by roarinelk »

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:
Imagehttps://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).
Rseding91
Factorio Staff
Factorio Staff
Posts: 14778
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.6] [nvidia, linux] glitch in gui tabs due to non-integer Y coordinates

Post by Rseding91 »

Thanks for the report however I'm not sure what you're asking for?

Our internal game logic draws all lines on integer x/y points. When they're rendered on screen it may do transformations to scale the final result.

The end result lines used in the tab are always drawn with triangles fans.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Pending”