refactoring

This commit is contained in:
2025-08-17 12:40:31 -05:00
parent 47564bb3cf
commit 2a1654e80c
13 changed files with 120 additions and 1901 deletions

View File

@@ -7,13 +7,13 @@
namespace shader {
// Reads shader source files, compiles, and links
bool load(uint* out_id, const char *vertex_filepath, const char *fragment_filepath);
bool load(uint* out_id, const char* vertex_filepath, const char* fragment_filepath);
// Sets shader as active on the gpu
void use(uint id);
// Set uniform value
typedef std::variant<int, float, bool> uniform_variant;
void set_uniform(uint id, const char *name, uniform_variant value);
typedef std::variant<int, float, bool, vec4, vec3, vec2, vec4i, vec3i, vec2i> uniform_variant;
void set_uniform(uint id, const char* name, uniform_variant value);
} // namespace shaders