News for hackers. Stuff that matters.
Re:The joy of building a ray tracer, for fun, in Rust by boomlinde on Wednesday January 05, 2022 @09:29AM (#29809363)
When I want a quick way to get pixels on the screen I just print a PPM image to stdout and pipe my program into `feh -`.

There are two PPM formats, both very simple: http://netpbm.sourceforge.net/doc/ppm.html

For example, the header

    printf("P6\n%lu %lu\n255\n", width, height);
followed by width*height triplets of raw bytes representing the RGB values of each pixel.

There are no comments on this comment yet.