From 9f23f65ec631bcd08f200b3ef517da8acf8d6b17 Mon Sep 17 00:00:00 2001 From: Omniscient Date: Thu, 11 Jul 2024 18:03:34 +1000 Subject: new --- src/systems/terrain.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'src/systems/terrain.c') diff --git a/src/systems/terrain.c b/src/systems/terrain.c index 6342d66..a8e8b48 100644 --- a/src/systems/terrain.c +++ b/src/systems/terrain.c @@ -11,14 +11,28 @@ #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 = { +struct Terrain_Storage { + arena terrain_allocator; + heightmap* heightmap; // NULL = no heightmap + GPU_Renderpass* hmap_renderpass; + GPU_Pipeline* hmap_pipeline; +}; - }; +PUB bool Terrain_Init(Terrain_Storage* storage) { - state->hmap_renderpass = gpu_renderpass_create(&rpass_desc); - state->hmap_pipeline = gpu_graphics_pipeline_create(pipeline_desc); -} \ No newline at end of file + return true; +} +PUB void Terrain_Shutdown(Terrain_Storage* storage); + + +/* 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); */ +/* } */ -- cgit v1.2.3-70-g09d2