terrain

Real-time terrain generation using marching cubes
git clone git://git.christianermann.dev/terrain
Log | Files | Refs | README | LICENSE

shader.h (590B)


      1 #ifndef SHADER_H
      2 #define SHADER_H
      3 
      4 #include "types.h"
      5 #include "vec.h"
      6 
      7 #include "glad/glad.h"
      8 
      9 typedef struct Shader Shader;
     10 
     11 Shader *Shader_make(const char *vert_filename, const char *frag_filename);
     12 void Shader_free(Shader *shader);
     13 
     14 void Shader_use(Shader *shader);
     15 
     16 void Shader_reload(Shader *shader);
     17 
     18 void Shader_setInt(const Shader *shader, const char *name, i32 i);
     19 void Shader_setFloat(const Shader *shader, const char *name, f32 f);
     20 void Shader_setVec3(const Shader *shader, const char *name, Vec3 v);
     21 void Shader_setMat4(const Shader *shader, const char *name, Mat4 m);
     22 
     23 #endif