GNOME Bugzilla – Bug 661071
GLES2 Shader does not compile with Clutter 1.8.0 anymore
Last modified: 2011-10-28 16:05:45 UTC
I wonder if one would consider that as an API break, the fact is that shaders that used to work with earlier version don't anymore. It seems to be because of a change in the vertex shader generated. For instance, the GLSL shader compilation in clutter-gst fails with: (lt-test-yuv-upload:2432): Cogl-WARNING **: Failed to link GLSL program: Varying variable tex_coord is used in fragment shader, but not found in vertex shader.
A patch to update the variable names make clutter-gst work again -#define TEX_COORD "tex_coord" -#define COLOR_VAR "frag_color" +#define TEX_COORD "cogl_tex_coord_in[0]" +#define COLOR_VAR "cogl_color_in" I guess that one could #define text_coord cogl_tex_coord_in[0] and #define frag_color cogl_color_in in the GLES2 shader boilerplate to maintain compatibility?
It seems a shame to keep those old names unless we really have to because they aren't namespaced and could quite easily collide with someone's own names. I was kind of assuming those names weren't officially part of the API so we could get away with changing them?
Well, in my case it just means that I need to bump the dependency on Cogl and Clutter to 1.8.0, so not such a big deal. Granted the number of people having GLSL ES shaders with Clutter might not be huge, but code will break for them (maybe we should ask tomeu? or at least make it clear?)
Ok, just landed the fix in clutter-gst and depend on Clutter 1.6.0