20 lines
568 B
C
20 lines
568 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#define STB_IMAGE_IMPLEMENTATION
|
|
#include "stb_image/stb_image.h"
|
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
|
#include "stb_image/stb_image_write.h"
|
|
#include "examples.h"
|
|
|
|
int main() {
|
|
int width = 1280;
|
|
int height = 780;
|
|
int channels = 4;
|
|
unsigned char *image = (unsigned char*)malloc(width * height * channels );
|
|
example_color(width, height, channels, image);
|
|
stbi_write_png("C:/Users/ary/CLionProjects/Raytracer/test.png", width, height, channels, image, width * channels);
|
|
free(image);
|
|
|
|
return 0;
|
|
} |