From 0cd7f50e11d89311762ae062bb1cfa876a317353 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Mon, 22 Oct 2018 01:41:32 +0300 Subject: use shaders/data.h for the definition of vertices Now that shaders/data.h is in place, it can be taken to the next extreme. The information stored in shaders/data.h is plentiful enough that vertex attribute location information can be standardised, the definition of vertices can be specified in only one place and the bindings for vertex information can be generated. It's around this point in time that I wish there was a better pre-processor for all this. It might make things a lot cleaner. --- glprog.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'glprog.h') diff --git a/glprog.h b/glprog.h index 74987b3..783e574 100644 --- a/glprog.h +++ b/glprog.h @@ -22,6 +22,10 @@ struct shader { struct glprog_progs { #define SH_PROG(name) struct shader name; #include "shaders/data.h" + struct { +#define SH_IN(_0, name) GLint name; +#include "shaders/data.h" + } attr; }; extern struct glprog_progs prog; -- cgit v1.2.3-54-g00ecf