TIL: aligning horizontal or vertical lines to the pixel grid with OpenGL

When I started using my new M1 Max MacBook Pro in December, a bunch of vpype’s tests started to fail. The failing tests were all image-based: an image is rendered and then compared to a previously-generated, reference image. This process is made easy thanks to this Pytest fixture. In this case, the reference images were generated long ago on my previous, Intel/AMD-based MacBook Pro. This GIF highlights the discrepancy I’d get with images generated on my new computer (notice how the ruler’s thickness varies):...

April 5, 2022