From 35a70d71f62e41d78d68247075ce174f2b6d997a Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Wed, 7 Feb 2024 22:49:00 +0100 Subject: inital commit -- THE CUBES SPIN Signed-off-by: Anna (navi) Figueiredo Gomes --- include/render/shader.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/render/shader.h (limited to 'include/render/shader.h') diff --git a/include/render/shader.h b/include/render/shader.h new file mode 100644 index 0000000..0e827df --- /dev/null +++ b/include/render/shader.h @@ -0,0 +1,25 @@ +#ifndef _RENDER_SHADER_H_ +#define _RENDER_SHADER_H_ + +#include +#include + +struct renderer; + +struct shader { + size_t len; + uint8_t *code; + VkShaderStageFlagBits stage; +}; + +struct shader_input { + size_t desc_count; + VkVertexInputBindingDescription *descs; + size_t attr_count; + VkVertexInputAttributeDescription *attrs; +}; + +VkResult shader_create_module(struct renderer *ren, const size_t len, uint8_t code[len], VkShaderModule *module); +bool shader_load(const char *filename, struct shader *shader); + +#endif -- cgit v1.2.3