summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorEric Engestrom <eric@engestrom.ch>2022-09-02 16:15:24 +0100
committerEric Engestrom <eric@engestrom.ch>2022-09-02 16:28:58 +0100
commit92a523d29d3dcedd8d45b31e9ec04e1c8243aa95 (patch)
tree7ec1fd84ba89c8aa5ffd8025ed444ccfd459d6c4 /common.h
parent94bee60c016bfc55164715249d2bb724de095ea9 (diff)
downloadkmscube-92a523d29d3dcedd8d45b31e9ec04e1c8243aa95.tar.gz
make GLES3 optional
This means that `shadertoy` & `texturator` might not be supported in a given build. Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Diffstat (limited to 'common.h')
-rw-r--r--common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.h b/common.h
index 7c41fee..c5d624a 100644
--- a/common.h
+++ b/common.h
@@ -175,7 +175,18 @@ enum mode {
const struct egl * init_cube_smooth(const struct gbm *gbm, int samples);
const struct egl * init_cube_tex(const struct gbm *gbm, enum mode mode, int samples);
+
+#ifdef HAVE_GLES3
const struct egl * init_cube_shadertoy(const struct gbm *gbm, const char *shadertoy, int samples);
+#else
+static inline const struct egl *
+init_cube_shadertoy(const struct gbm *gbm, const char *shadertoy, int samples)
+{
+ (void)gbm; (void)shadertoy; (void)samples;
+ printf("no GLES3 support!\n");
+ return NULL;
+}
+#endif
#ifdef HAVE_GST