erzeugung vom ersten test image. farbuebergang rot und gruen.
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
#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);
|
||||
|
||||
int main(void) {
|
||||
printf("Hello, Worldd!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user