aboutsummaryrefslogtreecommitdiffstats
path: root/glprog.h
diff options
context:
space:
mode:
Diffstat (limited to 'glprog.h')
-rw-r--r--glprog.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/glprog.h b/glprog.h
index cd0ef83..74987b3 100644
--- a/glprog.h
+++ b/glprog.h
@@ -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