diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-13 17:25:13 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-13 17:25:13 +1000 |
commit | 13949ca02bcf9fcdfcc48ea7949f617553a260b6 (patch) | |
tree | 28361375cc637c8442db3c79d274eaca0f4fbf00 /src/render | |
parent | 87a8749049d74cc8aa3f0cacf0b896640dc53763 (diff) |
allow UV tiling for plane geometry
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/immdraw.c | 2 | ||||
-rw-r--r-- | src/render/render.c | 2 | ||||
-rw-r--r-- | src/render/shadows.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/render/immdraw.c b/src/render/immdraw.c index a097f90..c2589c3 100644 --- a/src/render/immdraw.c +++ b/src/render/immdraw.c @@ -22,7 +22,7 @@ void Immdraw_Init(Immdraw_Storage* storage) { Geometry cube_geo = Geo_CreateCuboid(f32x3(1.0, 1.0, 1.0)); storage->cube = Mesh_Create(&cube_geo, true); - Geometry plane_geo = Geo_CreatePlane(f32x2(1.0, 1.0)); + Geometry plane_geo = Geo_CreatePlane(f32x2(1.0, 1.0), 1, 1); storage->plane = Mesh_Create(&plane_geo, true); storage->bbox = GenBboxMesh(); diff --git a/src/render/render.c b/src/render/render.c index 26007b7..4e7a60c 100644 --- a/src/render/render.c +++ b/src/render/render.c @@ -155,6 +155,8 @@ void Renderer_Shutdown(Renderer* ren) { DEBUG("Freed PBR storage"); free(ren->terrain); DEBUG("Freed Terrain storage"); + free(ren->immediate); + DEBUG("Freed Immdraw storage"); arena_free_storage(&ren->frame_arena); DEBUG("Freed frame allocator buffer"); } diff --git a/src/render/shadows.c b/src/render/shadows.c index 499ec02..3d348ea 100644 --- a/src/render/shadows.c +++ b/src/render/shadows.c @@ -127,7 +127,7 @@ void Shadow_Init(Shadow_Storage* storage, u32 shadowmap_width, u32 shadowmap_hei storage->debugquad_pipeline = GPU_GraphicsPipeline_Create(debugquad_pipeline_desc, storage->debugquad_pass); - Geometry quad_geo = Geo_CreatePlane(f32x2(1, 1)); + Geometry quad_geo = Geo_CreatePlane(f32x2(1, 1), 1,1 ); // HACK: Swap vertices to make it face us Vertex top0 = quad_geo.vertices->data[0]; quad_geo.vertices->data[0] = quad_geo.vertices->data[2]; |