diff options
author | iurii plugatarov <[email protected]> | 2024-08-10 14:22:45 +0200 |
---|---|---|
committer | iurii plugatarov <[email protected]> | 2024-08-10 14:22:45 +0200 |
commit | 90e85b2fe655a2643535b0f49d99836ac72e724c (patch) | |
tree | 66c0656984da7b2b8a6c06c4b0af764919e0e318 /src/shader.h | |
parent | 86eb1bfcf21819492e0ec55cd08127fa8a5c6769 (diff) | |
download | ogl-90e85b2fe655a2643535b0f49d99836ac72e724c.tar.gz |
custom shader loader
Diffstat (limited to '')
-rw-r--r-- | src/shader.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/shader.h b/src/shader.h new file mode 100644 index 0000000..ee06930 --- /dev/null +++ b/src/shader.h @@ -0,0 +1,19 @@ +#ifndef SHADER_H +#define SHADER_H + +#include <GL/glew.h> + +typedef struct { + GLuint program; +} Shader; + +Shader *shader_create(const char *vertex_path, const char *fragment_path); +void shader_use(Shader *shader); +void shader_delete(Shader *shader); +void shader_set_int(Shader *shader, const char *name, int value); +void shader_set_float(Shader *shader, const char *name, float value); +void shader_set_vec3(Shader *shader, const char *name, float x, float y, + float z); +void shader_set_mat4(Shader *shader, const char *name, const float *value); + +#endif |