compositor: fix fan_debug mode
- make it respect output transforms by making sure the uniforms are up-to-date - properly restore the current shader program, in case it was overridden Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
2abe2e6d41
commit
c73bd54b58
+6
-1
@@ -1269,7 +1269,7 @@ triangle_fan_debug(struct weston_surface *surface, int first, int count)
|
|||||||
glUniform4fv(compositor->solid_shader.color_uniform, 1,
|
glUniform4fv(compositor->solid_shader.color_uniform, 1,
|
||||||
color[color_idx++ % ARRAY_SIZE(color)]);
|
color[color_idx++ % ARRAY_SIZE(color)]);
|
||||||
glDrawElements(GL_LINES, nelems, GL_UNSIGNED_SHORT, buffer);
|
glDrawElements(GL_LINES, nelems, GL_UNSIGNED_SHORT, buffer);
|
||||||
glUseProgram(surface->shader->program);
|
glUseProgram(compositor->current_shader->program);
|
||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1369,6 +1369,11 @@ weston_surface_draw(struct weston_surface *es, struct weston_output *output,
|
|||||||
|
|
||||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
|
if (ec->fan_debug) {
|
||||||
|
weston_compositor_use_shader(ec, &ec->solid_shader);
|
||||||
|
weston_shader_uniforms(&ec->solid_shader, es, output);
|
||||||
|
}
|
||||||
|
|
||||||
weston_compositor_use_shader(ec, es->shader);
|
weston_compositor_use_shader(ec, es->shader);
|
||||||
weston_shader_uniforms(es->shader, es, output);
|
weston_shader_uniforms(es->shader, es, output);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user