Add progress bars and argument parsing
This commit is contained in:
parent
742ef283e4
commit
a45ae025d6
7 changed files with 4897 additions and 29 deletions
|
|
@ -24,4 +24,12 @@ void write_color(FILE *fp, color c, uint32_t samples_per_pixel)
|
|||
(uint8_t) (255 * clamp(b, 0, 1)));
|
||||
}
|
||||
|
||||
void write_image(color *image, uint64_t n, FILE *fp, uint32_t samples_per_pixel)
|
||||
{
|
||||
for (int64_t i = n-1; i >= 0; --i)
|
||||
{
|
||||
write_color(fp, image[i], samples_per_pixel);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue