summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/renderer/bind_group_layouts.h4
-rw-r--r--src/renderer/ral.c8
-rw-r--r--src/renderer/ral.h3
-rw-r--r--src/renderer/standard_vertex_types.c11
4 files changed, 13 insertions, 13 deletions
diff --git a/src/renderer/bind_group_layouts.h b/src/renderer/bind_group_layouts.h
index d2571ef..246d1ef 100644
--- a/src/renderer/bind_group_layouts.h
+++ b/src/renderer/bind_group_layouts.h
@@ -16,10 +16,10 @@
// 1. Scene / Global
typedef struct bg_globals {
- f32 total_time;
- f32 delta_time;
mat4 view;
mat4 projection;
+ f32 total_time;
+ f32 delta_time;
} bg_globals;
// 2. Material (once per object)
diff --git a/src/renderer/ral.c b/src/renderer/ral.c
index 2ae7c23..7d868be 100644
--- a/src/renderer/ral.c
+++ b/src/renderer/ral.c
@@ -32,3 +32,11 @@ void vertex_desc_add(vertex_description* builder, const char* name, vertex_attri
builder->attributes_count++;
}
+
+vertex_description static_3d_vertex_description() {
+ vertex_description builder = { .debug_label = "vertex" };
+ vertex_desc_add(&builder, "position", ATTR_F32x3);
+ vertex_desc_add(&builder, "normal", ATTR_F32x3);
+ vertex_desc_add(&builder, "texCoords", ATTR_F32x2);
+ return builder;
+}
diff --git a/src/renderer/ral.h b/src/renderer/ral.h
index bd2d701..376898f 100644
--- a/src/renderer/ral.h
+++ b/src/renderer/ral.h
@@ -166,3 +166,6 @@ void gpu_backend_end_frame();
void gpu_temp_draw(size_t n_verts);
// TODO: --- Compute
+
+// --- Helpers
+vertex_description static_3d_vertex_description();
diff --git a/src/renderer/standard_vertex_types.c b/src/renderer/standard_vertex_types.c
deleted file mode 100644
index 4973bf0..0000000
--- a/src/renderer/standard_vertex_types.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "ral.h"
-#include "ral_types.h"
-#include "render.h"
-
-vertex_description static_3d_vertex_description() {
- vertex_description builder = { .debug_label = "vertex" };
- vertex_desc_add(&builder, "position", ATTR_F32x3);
- vertex_desc_add(&builder, "normal", ATTR_F32x3);
- vertex_desc_add(&builder, "texCoords", ATTR_F32x2);
- return builder;
-} \ No newline at end of file