From 7ec62c58e9560fc961ec3522490e40ad1d259c72 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Thu, 18 Jul 2024 16:17:23 +1000 Subject: wip skybox. make geometry owned and copied onto Mesh --- src/new_render/render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/new_render/render.c') diff --git a/src/new_render/render.c b/src/new_render/render.c index d98db4f..2a0ea9d 100644 --- a/src/new_render/render.c +++ b/src/new_render/render.c @@ -188,7 +188,7 @@ Mesh Mesh_Create(Geometry* geometry, bool free_on_upload) { GPU_BufferCreate(index_bytes, BUFFER_INDEX, BUFFER_FLAG_GPU, geometry->indices->data); m.is_uploaded = true; - m.geometry = geometry; + m.geometry = *geometry; // clone geometry data and store on Mesh struct if (free_on_upload) { Geometry_Destroy(geometry); } -- cgit v1.2.3-70-g09d2