mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
gl renderer: Initialize alpha uniform to 1.0
This makes gl-legacy work and gl-gles work except for text and icons.
This commit is contained in:
parent
1243174e53
commit
06f63764fb
@ -2791,6 +2791,16 @@ gsk_gl_renderer_create_programs (GskGLRenderer *self,
|
||||
INIT_PROGRAM_UNIFORM_LOCATION (repeat, child_bounds);
|
||||
INIT_PROGRAM_UNIFORM_LOCATION (repeat, texture_rect);
|
||||
|
||||
|
||||
/* We initialize the alpha uniform here, since the default value is important.
|
||||
* We can't do it in the shader like a resonable person would because that doesn't
|
||||
* work in gles. */
|
||||
for (i = 0; i < GL_N_PROGRAMS; i++)
|
||||
{
|
||||
glUseProgram(self->programs[i].id);
|
||||
glUniform1f (self->programs[i].alpha_location, 1.0);
|
||||
}
|
||||
|
||||
out:
|
||||
gsk_gl_shader_builder_finish (&shader_builder);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user