summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-10-19 13:42:18 +0100
committerNeil Roberts <neil@linux.intel.com>2011-10-19 13:50:48 +0100
commitb240b95a97a220f760c06fe09cde3eeb91fed581 (patch)
treea36f4ffbce1618a777dc1cab3297bd54cd548573
parent8083dd51786492237355003278208824cf99edcb (diff)
downloadclutter-b240b95a97a220f760c06fe09cde3eeb91fed581.tar.gz
tests: Use the portable cogl wrappers for GLSL builtins
Instead of directly using the GLSL names for the builtins in the shaders for test-shader and test-pick, this makes it use the Cogl wrapper names instead. That way it will be portable to GLES2 as well. Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
-rw-r--r--tests/conform/test-pick.c4
-rw-r--r--tests/interactive/test-shader.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/conform/test-pick.c b/tests/conform/test-pick.c
index c10a6b080..b3cbd7400 100644
--- a/tests/conform/test-pick.c
+++ b/tests/conform/test-pick.c
@@ -55,8 +55,8 @@ shader_paint (ClutterEffect *effect,
"uniform float step;\n"
"void main (void)\n"
"{\n"
- " gl_FragColor = texture2D(tex, vec2 (gl_TexCoord[0].s + step,\n"
- " gl_TexCoord[0].t));\n"
+ " cogl_color_out = texture2D(tex, vec2 (cogl_tex_coord_in[0].s + step,\n"
+ " cogl_tex_coord_in[0].t));\n"
"}\n");
tex_width = clutter_actor_get_width (actor);
diff --git a/tests/interactive/test-shader.c b/tests/interactive/test-shader.c
index 44ab581ff..14eb69ff8 100644
--- a/tests/interactive/test-shader.c
+++ b/tests/interactive/test-shader.c
@@ -36,8 +36,7 @@ typedef struct
* correctly).
*/
#define FRAGMENT_SHADER_END \
- " gl_FragColor = color;" \
- " gl_FragColor = gl_FragColor * cogl_color_in;" \
+ " cogl_color_out = color * cogl_color_in;" \
"}"
static ShaderSource shaders[]=