summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/new_render/render.c2
-rw-r--r--src/new_render/skybox.c21
-rw-r--r--src/systems/terrain.c4
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);