From ce318e41868ceea632ee90442fbddf4128d22817 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Tue, 7 May 2024 12:23:13 +1000 Subject: expand the concept of a render_entity --- src/renderer/render_types.h | 12 +++++++++++- src/renderer/renderpasses.h | 6 +----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/renderer/render_types.h b/src/renderer/render_types.h index a5c0c1a..08b9e94 100644 --- a/src/renderer/render_types.h +++ b/src/renderer/render_types.h @@ -112,4 +112,14 @@ KITC_DECL_TYPED_ARRAY(material) #include "animation.h" KITC_DECL_TYPED_ARRAY(animation_clip) #define TYPED_ANIMATION_CLIP_ARRAY -#endif \ No newline at end of file +#endif + +/** @brief Describes all the data required for the renderer to start executing draws */ +typedef struct render_entity { + buffer_handle index_buffer; + u32 index_count; + u32 index_offset; + buffer_handle vertex_buffer; + material* material; + transform tf; +} render_entity; \ No newline at end of file diff --git a/src/renderer/renderpasses.h b/src/renderer/renderpasses.h index 91970d8..951ff6e 100644 --- a/src/renderer/renderpasses.h +++ b/src/renderer/renderpasses.h @@ -12,17 +12,13 @@ #include "maths_types.h" #include "ral.h" #include "render.h" +#include "render_types.h" // Shadowmap pass // Blinn-phong pass // Unlit pass // Debug visualisations pass -typedef struct render_entity { - model* model; - transform tf; -} render_entity; - // Don't need to pass in *anything*. gpu_renderpass* renderpass_blinn_phong_create(); void renderpass_blinn_phong_execute(gpu_renderpass* pass, render_entity* entities, -- cgit v1.2.3-70-g09d2