diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-07-24 17:32:49 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-07-24 17:32:49 +0200 |
| commit | 6bdf3ab65a7c1e98595ad167479b94a82184a444 (patch) | |
| tree | de1113e28d78ae5325aa9417b059ba9963407e26 /include/utils.hpp | |
| parent | 44e63fdbd30e9d43a02ab894c548467039397aa0 (diff) | |
Clean up includes, scene class, simplify scene buffer access from main
Diffstat (limited to 'include/utils.hpp')
| -rw-r--r-- | include/utils.hpp | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/include/utils.hpp b/include/utils.hpp index 4683e86..b00db81 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -1,42 +1,11 @@ #ifndef __UTILS_HPP_ #define __UTILS_HPP_ -#include <cstdint> -#include <cstdlib> +#include <string> #include <vector> -#include "vec3.hpp" -#include "sphere.hpp" -#include "camera.hpp" -#include "bvh-node.hpp" - -struct input_data { - color sky_color; - color ground_color; - - camera cam; - - sphere spheres[512]; - bvh_node nodes[1024]; - - uint32_t max_bounce; - - // Output image resolution - uint32_t width; - uint32_t height; - - uint32_t sample_index; - - uint32_t spheres_count; - uint32_t enable_dof; - uint32_t debug_bvh; - uint32_t padding; -}; - -std::vector<uint8_t> get_shader_code(const char* path); -std::vector<uint8_t> get_shader_code(std::string& path); - -struct input_data create_inputs(uint32_t width, uint32_t height); +std::vector<uint8_t> read_file(const char* path); +std::vector<uint8_t> read_file(std::string& path); #define PI 3.14159265359 |
