From 25125b2e23c02199bdefb3a638584465229fd833 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sun, 17 Jan 2021 20:54:11 +0100 Subject: Handle window resize --- include/utils.hpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'include/utils.hpp') diff --git a/include/utils.hpp b/include/utils.hpp index 42a5a1a..830b006 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -2,13 +2,37 @@ #define __UTILS_HPP_ #include - +#include #include -#include +#include "vec3.hpp" +#include "sphere.hpp" +#include "camera.hpp" + +struct input_data { + color sky_color; + color ground_color; + + camera cam; + + float random_offset[2000]; + float random_disk[2000]; + vec3 random_in_sphere[1000]; + + sphere spheres[512]; + + uint32_t max_bounce; + uint32_t samples_per_pixel; + + // Output image resolution + uint32_t width; + uint32_t height; +}; std::vector get_shader_code(const char* path); +struct input_data create_inputs(uint32_t width, uint32_t height); + #define PI 3.14159265359 inline float deg_to_rad(float deg) { -- cgit v1.3