Fix text not rendered when showing window logo
This commit is contained in:
parent
bd1276d079
commit
b8b495ac31
@ -580,7 +580,7 @@ render_window_title(OSWindow *os_window, Screen *screen UNUSED, GLfloat xstart,
|
||||
}
|
||||
|
||||
static void
|
||||
draw_window_logo(int program, OSWindow *os_window, const WindowLogoRenderData *wl, GLfloat window_left_gl, GLfloat window_top_gl, GLfloat window_width_gl, GLfloat window_height_gl) {
|
||||
draw_window_logo(int program, ssize_t vao_idx, OSWindow *os_window, const WindowLogoRenderData *wl, GLfloat window_left_gl, GLfloat window_top_gl, GLfloat window_width_gl, GLfloat window_height_gl) {
|
||||
if (os_window->live_resize.in_progress) return;
|
||||
GLfloat logo_width_gl = 2.f * ((float)wl->instance->width) / os_window->viewport_width;
|
||||
GLfloat logo_height_gl = 2.f * ((float)wl->instance->height) / os_window->viewport_height;
|
||||
@ -590,7 +590,7 @@ draw_window_logo(int program, OSWindow *os_window, const WindowLogoRenderData *w
|
||||
ird.texture_id = wl->instance->texture_id;
|
||||
gpu_data_for_image(&ird, logo_left_gl, logo_top_gl, logo_left_gl + logo_width_gl, logo_top_gl - logo_height_gl);
|
||||
send_graphics_data_to_gpu(1, os_window->gvao_idx, &ird);
|
||||
draw_graphics(program, 0, os_window->gvao_idx, &ird, 0, 1);
|
||||
draw_graphics(program, vao_idx, os_window->gvao_idx, &ird, 0, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -683,7 +683,7 @@ draw_cells_interleaved(ssize_t vao_idx, ssize_t gvao_idx, Screen *screen, OSWind
|
||||
}
|
||||
|
||||
if (screen->grman->num_of_below_refs || has_bgimage(w) || wl) {
|
||||
if (wl) draw_window_logo(GRAPHICS_PROGRAM, w, wl, xstart, ystart, width, height);
|
||||
if (wl) draw_window_logo(GRAPHICS_PROGRAM, vao_idx, w, wl, xstart, ystart, width, height);
|
||||
bind_program(CELL_BG_PROGRAM);
|
||||
if (screen->grman->num_of_below_refs) draw_graphics(
|
||||
GRAPHICS_PROGRAM, vao_idx, gvao_idx, screen->grman->render_data, 0, screen->grman->num_of_below_refs);
|
||||
@ -739,7 +739,7 @@ draw_cells_interleaved_premult(ssize_t vao_idx, ssize_t gvao_idx, Screen *screen
|
||||
BLEND_PREMULT;
|
||||
|
||||
if (screen->grman->num_of_below_refs || has_bgimage(os_window) || wl) {
|
||||
if (wl) draw_window_logo(GRAPHICS_PREMULT_PROGRAM, os_window, wl, xstart, ystart, width, height);
|
||||
if (wl) draw_window_logo(GRAPHICS_PREMULT_PROGRAM, vao_idx, os_window, wl, xstart, ystart, width, height);
|
||||
if (screen->grman->num_of_below_refs) draw_graphics(
|
||||
GRAPHICS_PREMULT_PROGRAM, vao_idx, gvao_idx, screen->grman->render_data, 0, screen->grman->num_of_below_refs);
|
||||
bind_program(CELL_BG_PROGRAM);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user