Merge pull request #1519 from lakkatv/xmb

(XMB) Prevent the shader attrib array overflow
This commit is contained in:
Twinaphex 2015-03-16 23:17:52 +01:00
commit 1aa20f3474

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,