summaryrefslogtreecommitdiff
path: root/src/systems
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-06-22 17:24:05 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-06-22 17:24:43 +1000
commita2b43f8f93365874ba46dfaacd59df9e197c32e7 (patch)
treed1663c8dde2cb29cb7eaabfde0cf2050fe248f35 /src/systems
parent434d7387fe0dda917d3a9f1df7f1c5fd113d6188 (diff)
add state for heightmap
Diffstat (limited to 'src/systems')
-rw-r--r--src/systems/terrain.c24
-rw-r--r--src/systems/terrain.h5
2 files changed, 28 insertions, 1 deletions
diff --git a/src/systems/terrain.c b/src/systems/terrain.c
index e69de29..1ff4078 100644
--- a/src/systems/terrain.c
+++ b/src/systems/terrain.c
@@ -0,0 +1,24 @@
+/**
+ * @file terrain.c
+ * @author your name (you@domain.com)
+ * @brief
+ * @version 0.1
+ * @date 2024-06-22
+ *
+ * @copyright Copyright (c) 2024
+ *
+ */
+#include "terrain.h"
+#include "ral.h"
+
+bool terrain_system_init(terrain_state* state) {
+ gpu_renderpass_desc rpass_desc = {
+ .default_framebuffer = true,
+ };
+ struct graphics_pipeline_desc pipeline_desc = {
+
+ };
+
+ state->hmap_renderpass = gpu_renderpass_create(&rpass_desc);
+ state->hmap_pipeline = gpu_graphics_pipeline_create(pipeline_desc);
+} \ No newline at end of file
diff --git a/src/systems/terrain.h b/src/systems/terrain.h
index 62aa568..888b6f4 100644
--- a/src/systems/terrain.h
+++ b/src/systems/terrain.h
@@ -18,6 +18,7 @@ Future:
#include "defines.h"
#include "maths_types.h"
#include "mem.h"
+#include "ral.h"
#include "render.h"
#include "str.h"
@@ -31,6 +32,8 @@ typedef struct heightmap {
typedef struct terrain_state {
arena terrain_allocator;
heightmap* heightmap; // NULL = no heightmap
+ gpu_renderpass* hmap_renderpass;
+ gpu_pipeline* hmap_pipeline;
} terrain_state;
bool terrain_system_init(terrain_state* state);
@@ -52,4 +55,4 @@ geometry_data geo_heightmap(arena* a, heightmap heightmap);
// somewhere there will be an easy way to add a heightmap
-// scene_add_heightmap \ No newline at end of file
+// TODO: scene_add_heightmap