From a1c74209795c341dc89dbe2f6c3a91242a8c813c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 15 Jul 2010 17:10:31 +0100 Subject: [PATCH] test-shader: The tex_coord varying is now an array under GLES2 Since the GLES2 wrapper grew support for multi-texturing, the tex_coord varying variable defined in the vertex shader is actually an array of texture coordinates so it ought to match in the fragment shader in test-shader. This seemed to work anyway under Mesa/Intel but under NVidia it does not so I don't think it's safe to assume that linking a non-array varying with an array will work. --- tests/interactive/test-shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/interactive/test-shader.c b/tests/interactive/test-shader.c index 0dd3c3e..e997b7a 100644 --- a/tests/interactive/test-shader.c +++ b/tests/interactive/test-shader.c @@ -24,9 +24,9 @@ typedef struct #define GLES2_VARS \ "precision mediump float;\n" \ - "varying vec2 tex_coord;\n" \ + "varying vec2 tex_coord[1];\n" \ "varying vec4 frag_color;\n" -#define TEX_COORD "tex_coord" +#define TEX_COORD "tex_coord[0]" #define COLOR_VAR "frag_color" #else /* COGL_HAS_GLES2 */ -- 2.7.4