[gtk: 5/15] shadertoy demo: Fix GLSL on GLES
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 5/15] shadertoy demo: Fix GLSL on GLES
- Date: Tue, 29 Sep 2020 08:30:50 +0000 (UTC)
commit 16cdb33c6c17615efaa57fd04e2ac14180bf68fa
Author: Alexander Larsson <alexl redhat com>
Date: Wed Sep 23 17:38:03 2020 +0200
shadertoy demo: Fix GLSL on GLES
I was getting "assignment to varying fragColor" errors
demos/gtk-demo/gtkshadertoy.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/gtkshadertoy.c b/demos/gtk-demo/gtkshadertoy.c
index 866bd69481..7d8c4926f6 100644
--- a/demos/gtk-demo/gtkshadertoy.c
+++ b/demos/gtk-demo/gtkshadertoy.c
@@ -56,13 +56,15 @@ const char *fragment_prefix =
"uniform float iSampleRate; // sound sample rate (i.e., 44100)\n"
"\n"
"in vec2 fragCoord;\n"
- "out vec4 fragColor;\n";
+ "out vec4 vFragColor;\n";
// Fragment shader suffix
const char *fragment_suffix =
" void main() {\n"
- " mainImage(fragColor, fragCoord);\n"
+ " vec4 c;\n"
+ " mainImage(c, fragCoord);\n"
+ " vFragColor = c;\n"
" }\n";
typedef struct {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]