summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-05-07 12:23:13 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-05-07 12:23:13 +1000
commitce318e41868ceea632ee90442fbddf4128d22817 (patch)
tree5f9e50df0ca2693c3405f85126012997946b2fad /src
parent945f84d0a1201b60dc470331d38ff6c1853a1149 (diff)
expand the concept of a render_entity
Diffstat (limited to 'src')
-rw-r--r--src/renderer/render_types.h12
-rw-r--r--src/renderer/renderpasses.h6
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,