diff options
author | Julian T <julian@jtle.dk> | 2020-02-21 06:55:27 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-02-21 06:55:27 +0100 |
commit | 623fee395425ab33f14fb9cd8ffa790e362f59d7 (patch) | |
tree | c70b64e13fd5e00c2317fa40ee4b8cd786e635d5 /pgm.h | |
parent | 63a84080f9f0e3d719d5470e370584a5eff18a47 (diff) |
Added pgm drawing and got light ray tracing working
Still needs correct light simulation and reflections
Diffstat (limited to 'pgm.h')
-rw-r--r-- | pgm.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#ifndef PGM_H +#define PGM_H + +#include <stdio.h> +#include <stdint.h> + +typedef struct { + uint8_t r, g, b; +} color_t; + +color_t *color_set(color_t *c, uint8_t r, uint8_t g, uint8_t b); + +int pgm_write_header(FILE *fp, unsigned int w, unsigned int h); +int pgm_write_pixel(FILE *fp, color_t *c); + +#endif |