From 544aac70015b6b075b172c42dd2d90dee3d029c0 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Thu, 18 Jul 2024 16:17:44 +1000 Subject: chore: format --- src/new_render/render.c | 2 +- src/new_render/skybox.c | 21 ++++++++------------- src/systems/terrain.c | 4 +--- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/new_render/render.c b/src/new_render/render.c index 2a0ea9d..a757c97 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; // clone geometry data and store on Mesh struct + m.geometry = *geometry; // clone geometry data and store on Mesh struct if (free_on_upload) { Geometry_Destroy(geometry); } diff --git a/src/new_render/skybox.c b/src/new_render/skybox.c index b8aa361..267ec6d 100644 --- a/src/new_render/skybox.c +++ b/src/new_render/skybox.c @@ -61,7 +61,7 @@ Skybox Skybox_Create(const char** face_paths, int n) { // VertexDesc_AddAttr(&pos_only, "inPos", ATTR_F32x3); // pos_only.use_full_vertex_size = true; - ShaderData camera_data = { .data = NULL, .get_layout = &Binding_Camera_GetLayout}; + ShaderData camera_data = { .data = NULL, .get_layout = &Binding_Camera_GetLayout }; ShaderData shader_data = { .data = NULL, .get_layout = &Skybox_GetLayout }; GraphicsPipelineDesc pipeline_desc = { @@ -69,16 +69,12 @@ Skybox Skybox_Create(const char** face_paths, int n) { .vertex_desc = static_3d_vertex_description(), .data_layouts = { camera_data, shader_data }, .data_layouts_count = 2, - .vs = { - .debug_name = "Skybox Vertex Shader", - .filepath = vert_path, - .code = vertex_shader.contents - }, - .fs = { - .debug_name = "Skybox Fragment Shader", - .filepath = frag_path, - .code = fragment_shader.contents - }, + .vs = { .debug_name = "Skybox Vertex Shader", + .filepath = vert_path, + .code = vertex_shader.contents }, + .fs = { .debug_name = "Skybox Fragment Shader", + .filepath = frag_path, + .code = fragment_shader.contents }, .wireframe = false, .depth_test = true, }; @@ -116,8 +112,7 @@ void Skybox_Draw(Skybox* skybox, Camera camera) { GPU_EncodeBindShaderData( enc, 0, (ShaderData){ .data = &camera_data, .get_layout = &Binding_Camera_GetLayout }); - - SkyboxUniforms uniforms = { .cubemap = skybox->texture }; + SkyboxUniforms uniforms = { .cubemap = skybox->texture }; ShaderData skybox_data = { .data = &uniforms, .get_layout = &Skybox_GetLayout }; GPU_EncodeBindShaderData(enc, 0, skybox_data); diff --git a/src/systems/terrain.c b/src/systems/terrain.c index 8a6b06a..9a49fad 100644 --- a/src/systems/terrain.c +++ b/src/systems/terrain.c @@ -11,9 +11,7 @@ struct Terrain_Storage { GPU_Pipeline* hmap_pipeline; }; -bool Terrain_Init(Terrain_Storage* storage) { - return true; -} +bool Terrain_Init(Terrain_Storage* storage) { return true; } void Terrain_Shutdown(Terrain_Storage* storage); -- cgit v1.2.3-70-g09d2