gl-renderer: rename color uniform to unicolor

A more unique name is easier to grep for. Using 'color' as a local
variable might be useful in the future.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 4 years ago
parent f6a8aa15f5
commit a8d5ef4a04
  1. 4
      libweston/renderer-gl/fragment.glsl
  2. 3
      libweston/renderer-gl/gl-shaders.c

@ -78,7 +78,7 @@ varying vec2 v_texcoord;
uniform sampler2D tex1; uniform sampler2D tex1;
uniform sampler2D tex2; uniform sampler2D tex2;
uniform float alpha; uniform float alpha;
uniform vec4 color; uniform vec4 unicolor;
void void
main() main()
@ -118,7 +118,7 @@ main()
gl_FragColor = yuva2rgba(y, u, v, alpha); gl_FragColor = yuva2rgba(y, u, v, alpha);
} else if (c_variant == SHADER_VARIANT_SOLID) { } else if (c_variant == SHADER_VARIANT_SOLID) {
gl_FragColor = alpha * color; gl_FragColor = alpha * unicolor;
} else { } else {
/* Never reached, bad variant value. */ /* Never reached, bad variant value. */

@ -235,7 +235,8 @@ gl_shader_create(struct gl_renderer *gr,
shader->tex_uniforms[1] = glGetUniformLocation(shader->program, "tex1"); shader->tex_uniforms[1] = glGetUniformLocation(shader->program, "tex1");
shader->tex_uniforms[2] = glGetUniformLocation(shader->program, "tex2"); shader->tex_uniforms[2] = glGetUniformLocation(shader->program, "tex2");
shader->alpha_uniform = glGetUniformLocation(shader->program, "alpha"); shader->alpha_uniform = glGetUniformLocation(shader->program, "alpha");
shader->color_uniform = glGetUniformLocation(shader->program, "color"); shader->color_uniform = glGetUniformLocation(shader->program,
"unicolor");
free(conf); free(conf);

Loading…
Cancel
Save