Basic driver for the ray tracer
This commit is contained in:
parent
9d6c293cad
commit
dc558c016b
1 changed files with 22 additions and 0 deletions
|
@ -5,10 +5,32 @@
|
|||
* Eryn Wells <eryn@erynwells.me>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <png.h>
|
||||
|
||||
#include "scene.h"
|
||||
#include "writer_png.h"
|
||||
|
||||
char *OUT_FILE = "charles_out.png";
|
||||
|
||||
|
||||
int
|
||||
main(int argc,
|
||||
const char *argv[])
|
||||
{
|
||||
FILE *out_file = fopen(OUT_FILE, "wb");
|
||||
if (!out_file) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Scene *scene = scene_init();
|
||||
|
||||
scene_render(scene);
|
||||
write_scene_png(scene, out_file);
|
||||
|
||||
scene_destroy(scene);
|
||||
fclose(out_file);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue