#ifndef SCENE_H #define SCENE_H #include "Camera.h" #include "Lighting/Light.h" #include "Material/Material.h" #include "RenderTarget.h" #include "Geometry/Triangle.h" typedef struct { uint32_t width; uint32_t height; uint32_t sample_count; uint8_t max_depth; uint32_t bucket_size; } rendering_config_t; typedef struct { vec3s coord; uint32_t tile_count_x; uint32_t tile_count_y; bool is_init; bool is_done; } rendering_context_t; typedef struct { uint32_t x; uint32_t y; uint32_t width; uint32_t height; } tile_t; typedef struct { camera_t camera; triangle_collection_t triangles; material_collection_t materials; light_collection_t lights; } scene_t; scene_t scene_create(const uint64_t triangle_count, const uint8_t material_count, const uint32_t max_punctual_lights); bool scene_render_tile(scene_t* scene, rendering_context_t* ctx, render_target_t* render_target, const rendering_config_t config, const uint32_t tile_index, tile_t* tile_out); render_target_t scene_render(scene_t* scene, const rendering_config_t config); void scene_free(scene_t* scene); #endif // SCENE_H