diff options
Diffstat (limited to 'src/new_render/shader_layouts.h')
-rw-r--r-- | src/new_render/shader_layouts.h | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/new_render/shader_layouts.h b/src/new_render/shader_layouts.h index c98f3c5..09cf129 100644 --- a/src/new_render/shader_layouts.h +++ b/src/new_render/shader_layouts.h @@ -15,7 +15,6 @@ typedef struct Binding_Model { /** @brief data that is handy to have in any shader */ typedef struct Binding_Globals { - } Binding_Globals; typedef struct pbr_point_light { @@ -33,45 +32,39 @@ static ShaderDataLayout Binding_Camera_GetLayout(void* data) { Binding_Camera* d = data; bool has_data = data != NULL; - ShaderBinding b1 = { - .label = "Camera", - .kind = BINDING_BYTES, - .data.bytes = { .size = sizeof(Binding_Camera) } - }; + ShaderBinding b1 = { .label = "Camera", + .kind = BINDING_BYTES, + .data.bytes = { .size = sizeof(Binding_Camera) } }; if (has_data) { b1.data.bytes.data = d; } - return (ShaderDataLayout) {.bindings = {b1 }, .binding_count = 1}; + return (ShaderDataLayout){ .bindings = { b1 }, .binding_count = 1 }; } static ShaderDataLayout Binding_Model_GetLayout(void* data) { Binding_Model* d = data; bool has_data = data != NULL; - ShaderBinding b1 = { - .label = "Model", - .kind = BINDING_BYTES, - .vis = VISIBILITY_VERTEX, - .data.bytes = { .size = sizeof(Binding_Model) } - }; + ShaderBinding b1 = { .label = "Model", + .kind = BINDING_BYTES, + .vis = VISIBILITY_VERTEX, + .data.bytes = { .size = sizeof(Binding_Model) } }; if (has_data) { b1.data.bytes.data = d; } - return (ShaderDataLayout) {.bindings = {b1 }, .binding_count = 1}; + return (ShaderDataLayout){ .bindings = { b1 }, .binding_count = 1 }; } static ShaderDataLayout Binding_Lights_GetLayout(void* data) { -Binding_Lights* d = data; + Binding_Lights* d = data; bool has_data = data != NULL; - ShaderBinding b1 = { - .label = "Lights", - .kind = BINDING_BYTES, - .vis = VISIBILITY_FRAGMENT, - .data.bytes = { .size = sizeof(Binding_Lights) } - }; + ShaderBinding b1 = { .label = "Lights", + .kind = BINDING_BYTES, + .vis = VISIBILITY_FRAGMENT, + .data.bytes = { .size = sizeof(Binding_Lights) } }; if (has_data) { b1.data.bytes.data = d; } - return (ShaderDataLayout) {.bindings = {b1 }, .binding_count = 1}; + return (ShaderDataLayout){ .bindings = { b1 }, .binding_count = 1 }; }
\ No newline at end of file |