aboutsummaryrefslogtreecommitdiffstats
path: root/glprog.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2022-10-16 19:31:21 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2022-10-16 19:31:21 +0100
commita59203b2ebc4f8671d04b743f0c9eb4f40170f3e (patch)
tree82a5658d110f0c16770ded2cf20f78484b31bf27 /glprog.c
parent926998d3d8c671c55e6a7fe6c6fa88f6512ccb46 (diff)
downloadfaqe-master.tar.gz
faqe-master.tar.xz
faqe-master.zip
Generate interface block using shaders/data.hHEADmaster
Diffstat (limited to 'glprog.c')
-rw-r--r--glprog.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/glprog.c b/glprog.c
index edb819e..58f45f3 100644
--- a/glprog.c
+++ b/glprog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
+ * Copyright (C) 2018, 2022 Tomasz Kramkowski <tk@the-tk.com>
* SPDX-License-Identifier: MIT
*/
#include <assert.h>
@@ -28,6 +28,10 @@ static const struct {
{ GL_VERTEX_SHADER, "vert", true,
#define SH_IN(type, name) "in " #type " " #name ";\n"
#include "shaders/data.h"
+ "out iface {\n"
+#define SH_IF(type, name) "\t" #type " " #name ";\n"
+#include "shaders/data.h"
+ "} o;\n"
},
{ GL_TESS_CONTROL_SHADER, "tesc", false, "" },
{ GL_TESS_EVALUATION_SHADER, "tese", false, "" },
@@ -36,6 +40,10 @@ static const struct {
#define SH_TEX(type, name) "uniform sampler" #type " t" #name ";\n"
#define SH_OUT(type, name) "out " #type " " #name ";\n"
#include "shaders/data.h"
+ "in iface {\n"
+#define SH_IF(type, name) "\t" #type " " #name ";\n"
+#include "shaders/data.h"
+ "} i;\n"
},
};