diff options
Diffstat (limited to 'glprog.h')
-rw-r--r-- | glprog.h | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -7,17 +7,25 @@ #include "gl.h" -struct unidat { - const char *name; - GLint *loc; +struct shader { + GLuint prog; + struct { +#define SH_UNI(_, name) GLint name; +#include "shaders/data.h" + } uni; + struct { +#define SH_TEX(_, name) GLint name; +#include "shaders/data.h" + } tex; }; -struct shdrdat { - GLuint type; - const char *src; - GLint len; +struct glprog_progs { +#define SH_PROG(name) struct shader name; +#include "shaders/data.h" }; -GLuint glprog_load(const struct shdrdat *shdrs, const struct unidat *unis); +extern struct glprog_progs prog; -#endif // SHADER_H +void glprog_init(void); + +#endif // GLPROG_H |