1
0
Fork 0

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>
This commit is contained in:
Neil Roberts 2011-10-19 13:42:18 +01:00
parent 8083dd5178
commit b240b95a97
2 changed files with 3 additions and 4 deletions

View file

@ -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);

View file

@ -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[]=