(XMB) Prevent the shader attrib array overflow

This commit is contained in:
Jean-André Santoni 2015-03-16 23:16:18 +01:00
parent 8071b15c0b
commit 4adc8dba10

View File

@ -310,6 +310,9 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb,
1.0f, 1.0f, 1.0f, alpha,
};
if (gl->shader && gl->shader->use)
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
glViewport(x, gl->win_height - y, xmb->icon.size, xmb->icon.size);
coords.vertices = 4;
@ -358,6 +361,9 @@ static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
1.0f, 1.0f, 1.0f, alpha,
};
if (gl->shader && gl->shader->use)
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
glViewport(x, gl->win_height - y, xmb->icon.size, xmb->icon.size);
coords.vertices = 4;
@ -1251,9 +1257,6 @@ static void xmb_frame(void)
if (!gl)
return;
if (gl->shader && gl->shader->use)
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
xmb_frame_background(gl, xmb, false);
xmb_draw_text(gl, xmb,