diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-11 23:41:41 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-11 23:41:41 +1000 |
commit | a8f98ddcf5ddeb3588492f4ad8f9a289147ad7ec (patch) | |
tree | cabfe0ffe5c41758451723557768841a4df003d7 | |
parent | 272cc9563315566061bbbd7078f76c76a3484e4b (diff) |
clang format
-rw-r--r-- | src/animation.h | 9 | ||||
-rw-r--r-- | src/core/core.c | 4 | ||||
-rw-r--r-- | src/ral/backends/opengl/backend_opengl.c | 3 | ||||
-rw-r--r-- | src/render/immdraw.h | 26 | ||||
-rw-r--r-- | src/render/render_types.h | 2 |
5 files changed, 23 insertions, 21 deletions
diff --git a/src/animation.h b/src/animation.h index 343746a..8bf3940 100644 --- a/src/animation.h +++ b/src/animation.h @@ -5,10 +5,11 @@ #include "maths_types.h" typedef enum Interpolation { - INTERPOLATION_STEP, - INTERPOLATION_LINEAR, - INTERPOLATION_CUBIC, /** @brief Cubic spline interpolation */ - INTERPOLATION_COUNT } Interpolation; + INTERPOLATION_STEP, + INTERPOLATION_LINEAR, + INTERPOLATION_CUBIC, /** @brief Cubic spline interpolation */ + INTERPOLATION_COUNT +} Interpolation; typedef enum KeyframeKind { KEYFRAME_ROTATION, diff --git a/src/core/core.c b/src/core/core.c index 64f59f3..af7daeb 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -76,6 +76,8 @@ Core* get_global_core() { return &g_core; } GLFWwindow* Core_GetGlfwWindowPtr(Core* core) { return g_core.window; } -struct Renderer* Core_GetRenderer(Core* core) { return core->renderer; } +struct Renderer* Core_GetRenderer(Core* core) { + return core->renderer; +} Model* Model_Get(ModelHandle h) { return Model_pool_get(&g_core.models, h); } diff --git a/src/ral/backends/opengl/backend_opengl.c b/src/ral/backends/opengl/backend_opengl.c index 3822220..97fd362 100644 --- a/src/ral/backends/opengl/backend_opengl.c +++ b/src/ral/backends/opengl/backend_opengl.c @@ -57,7 +57,8 @@ bool GPU_Backend_Init(const char* window_name, struct GLFWwindow* window, } // All of these are no-ops in OpenGL -void GPU_Backend_Shutdown() { /* TODO */ } +void GPU_Backend_Shutdown() { /* TODO */ +} bool GPU_Device_Create(GPU_Device* out_device) { return true; } void GPU_Device_Destroy(GPU_Device* device) {} bool GPU_Swapchain_Create(GPU_Swapchain* out_swapchain) { return true; } diff --git a/src/render/immdraw.h b/src/render/immdraw.h index 2983356..6b456d5 100644 --- a/src/render/immdraw.h +++ b/src/render/immdraw.h @@ -17,8 +17,8 @@ typedef struct Immdraw_Storage { } Immdraw_Storage; typedef struct ImmediateUniforms { - Mat4 model; - Vec4 colour; + Mat4 model; + Vec4 colour; } ImmediateUniforms; // --- Public API @@ -36,19 +36,17 @@ PUB void Immdraw_TransformGizmo(Transform tf, f32 size); // --- Internal static ShaderDataLayout ImmediateUniforms_GetLayout(void* data) { - ImmediateUniforms* d = (ImmediateUniforms*)data; - bool has_data = data != NULL; + ImmediateUniforms* d = (ImmediateUniforms*)data; + bool has_data = data != NULL; - ShaderBinding b1 = { - .label = "ImmUniforms", - .kind = BINDING_BYTES, - // .vis = VISIBILITY_VERTEX, - .data.bytes.size = sizeof(ImmediateUniforms) - }; + ShaderBinding b1 = { .label = "ImmUniforms", + .kind = BINDING_BYTES, + // .vis = VISIBILITY_VERTEX, + .data.bytes.size = sizeof(ImmediateUniforms) }; - if (has_data) { - b1.data.bytes.data = d; - } + if (has_data) { + b1.data.bytes.data = d; + } - return (ShaderDataLayout) {.bindings = { b1 }, .binding_count = 1}; + return (ShaderDataLayout){ .bindings = { b1 }, .binding_count = 1 }; } diff --git a/src/render/render_types.h b/src/render/render_types.h index 924777a..ce2c7b8 100644 --- a/src/render/render_types.h +++ b/src/render/render_types.h @@ -42,7 +42,7 @@ typedef struct Mesh { BufferHandle index_buffer; Geometry geometry; // NULL means it has been freed CPU-side MaterialHandle material; - bool is_skinned; // false = its static + bool is_skinned; // false = its static bool is_uploaded; // has the data been uploaded to the GPU } Mesh; #ifndef TYPED_MESH_CONTAINERS |