From 6dd2057de1e336084bad76cce4146b2f7e29c4a4 Mon Sep 17 00:00:00 2001 From: Greg Wells Date: Fri, 6 Jun 2025 11:40:08 -0400 Subject: [PATCH] shader input layouts --- src/core/shader_input/gryphn_shader_layout.h | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/core/shader_input/gryphn_shader_layout.h diff --git a/src/core/shader_input/gryphn_shader_layout.h b/src/core/shader_input/gryphn_shader_layout.h new file mode 100644 index 0000000..bb45568 --- /dev/null +++ b/src/core/shader_input/gryphn_shader_layout.h @@ -0,0 +1,25 @@ +#pragma once +#include "stdint.h" +#include "stdlib.h" + +typedef enum gnVertexFormat { + GN_FLOAT2 +} gnVertexFormat; + +typedef struct gnVertexAttribute { + uint32_t location; + gnVertexFormat format; + size_t offset; +} gnVertexAttribute; + +typedef struct gnBufferAttribute { + uint32_t binding; + size_t size; + uint32_t attributeCount; + gnVertexAttribute* attributes; +} gnBufferAttribute; + +typedef struct gnShaderInputLayout { + uint32_t bufferCount; + gnBufferAttribute* bufferAttributes; +} gnShaderInputLayout;