From a2806aeba0b1f886a2643d6c308e19f939b58105 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 25 Apr 2015 02:40:51 +0200 Subject: [PATCH] (GLUI) Only call gl->shader->use once per glui_frame call --- menu/drivers/glui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index ad83de1867..32d3929651 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -158,7 +158,6 @@ static void glui_render_background(settings_t *settings, gl_t *gl, glBindTexture(GL_TEXTURE_2D, 0); } - gl->shader->use(gl, GL_SHADER_STOCK_BLEND); gl->shader->set_coords(&coords); gl->shader->set_mvp(gl, &gl->mvp_no_rot); @@ -205,7 +204,6 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h, coords.color = color; glBindTexture(GL_TEXTURE_2D, 0); - gl->shader->use(gl, GL_SHADER_STOCK_BLEND); gl->shader->set_coords(&coords); gl->shader->set_mvp(gl, &gl->mvp_no_rot); @@ -571,6 +569,8 @@ static void glui_frame(void) if (settings->menu.mouse.enable) glui_draw_cursor(gl, menu->mouse.x, menu->mouse.y); + gl->shader->use(gl, GL_SHADER_STOCK_BLEND); + gl_set_viewport(gl, gl->win_width, gl->win_height, false, true); }