You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the line rlTranslatef(0.375, 0.375, 0) is commented out in BeginDrawing().
AFAIK, this 0.375 offset was used to align coordinates with the centers of pixels, as NVIDIA and ATI had different rounding conventions, this offset worked for both manufacturers.
However, I have doubts about the explanation in the comment stating that this line is no longer needed with OpenGL 3.3+:
//rlTranslatef(0.375, 0.375, 0); // HACK for 2D pixel-perfect drawing on OpenGL 1.1
// NOTE: Not required with OpenGL 3.3+
I suspect that rounding conventions might have been standardized between manufacturers, making the 0.375 offset unnecessary, but I haven't found confirmation on this.
Based on my knowledge, with OpenGL, and here in the case of orthographic 2D projection, integer coordinates still correspond to the corners of the pixels, not their centers, so the offset for pixel-perfect rendering might still be needed.
Do I lack any additional information on this?
The text was updated successfully, but these errors were encountered:
I suspect that rounding conventions might have been standardized between manufacturers, making the 0.375 offset unnecessary, but I haven't found confirmation on this.
@Bigfoot71 I could be wrong, but I think it was standardized by the IEEE 754 (ref). Which, AFAIK, the "big four" — ARM (ref), AMD (ref), Intel (ref) and Nvidia (ref) — follow. However, while (relatively) modern hardware doesn't appear to need it, it could still be necessary for really old hardware and/or old consoles.
This issue is about the discussions regarding the offset problems when rendering lines, see:
DrawRectangleRoundedLines()
results not aligned withDrawRectangleRounded()
#4601DrawRectangleLines
#4669I noticed that the line
rlTranslatef(0.375, 0.375, 0)
is commented out inBeginDrawing()
.AFAIK, this
0.375
offset was used to align coordinates with the centers of pixels, as NVIDIA and ATI had different rounding conventions, this offset worked for both manufacturers.However, I have doubts about the explanation in the comment stating that this line is no longer needed with OpenGL 3.3+:
I suspect that rounding conventions might have been standardized between manufacturers, making the
0.375
offset unnecessary, but I haven't found confirmation on this.Based on my knowledge, with OpenGL, and here in the case of orthographic 2D projection, integer coordinates still correspond to the corners of the pixels, not their centers, so the offset for pixel-perfect rendering might still be needed.
Do I lack any additional information on this?
The text was updated successfully, but these errors were encountered: