#pragma once #include #include #include "mesh.h" typedef struct { GLuint program_id; GLuint vertex_id; GLuint fragment_id; int attributes; } Shader; Shader *shader_init(const char *vertexFile, const char *fragmentFile); void shader_bind(Shader *shader); void shader_unbind(void); void shader_free(Shader *shader); GLint shader_uniform_location(Shader *shader, const char *name); void shader_load_float(GLint location, float value); void shader_load_int(GLint location, int value); void shader_load_vec3(GLint location, vec3 value); void shader_load_mat4(GLint location, mat4 value); void shader_load_ubo(GLint location, GLuint index, Uniform *uniform);