mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-30 14:53:39 +00:00
No longer do blending inside menu_display_draw_frame
This commit is contained in:
parent
5a17b79b48
commit
2b087f3be0
@ -202,7 +202,7 @@ static void glui_draw_icon(gl_t *gl, glui_handle_t *glui,
|
||||
height - y - glui->icon_size,
|
||||
glui->icon_size,
|
||||
glui->icon_size,
|
||||
gl->shader, &coords, &mymat, false, texture, 4,
|
||||
gl->shader, &coords, &mymat, texture, 4,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
|
||||
menu_display_draw_icon_blend_end(gl);
|
||||
@ -251,16 +251,20 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h,
|
||||
coords.lut_tex_coord = glui_tex_coords;
|
||||
coords.color = coord_color;
|
||||
|
||||
menu_display_draw_icon_blend_begin(gl);
|
||||
|
||||
menu_display_draw_frame(
|
||||
x,
|
||||
height - y - h,
|
||||
w,
|
||||
h,
|
||||
gl->shader, &coords,
|
||||
&gl->mvp_no_rot, true, glui->textures.white, 4,
|
||||
&gl->mvp_no_rot, glui->textures.white, 4,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP );
|
||||
|
||||
gl->coords.color = gl->white_color_ptr;
|
||||
|
||||
menu_display_draw_icon_blend_end(gl);
|
||||
}
|
||||
|
||||
static void glui_draw_scrollbar(gl_t *gl, unsigned width, unsigned height, GRfloat *coord_color)
|
||||
@ -592,7 +596,8 @@ static void glui_draw_cursor(gl_t *gl, glui_handle_t *glui,
|
||||
height - y - 32,
|
||||
64,
|
||||
64,
|
||||
gl->shader, &coords, &mymat, true, glui->textures.list[GLUI_TEXTURE_POINTER].id, 4,
|
||||
gl->shader, &coords, &mymat,
|
||||
glui->textures.list[GLUI_TEXTURE_POINTER].id, 4,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb,
|
||||
height - y,
|
||||
xmb->icon.size,
|
||||
xmb->icon.size,
|
||||
gl->shader, &coords, &mymat, false, texture, 4,
|
||||
gl->shader, &coords, &mymat, texture, 4,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
||||
height - y,
|
||||
xmb->icon.size,
|
||||
xmb->icon.size,
|
||||
gl->shader, &coords, mymat, false, texture, 4,
|
||||
gl->shader, &coords, mymat, texture, 4,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
}
|
||||
|
||||
@ -442,7 +442,7 @@ static void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb, GRfloat *color, unsigne
|
||||
height - y,
|
||||
xmb->boxart_size,
|
||||
xmb->boxart_size,
|
||||
gl->shader, &coords, &mymat, false, xmb->boxart, 4,
|
||||
gl->shader, &coords, &mymat, xmb->boxart, 4,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
}
|
||||
|
||||
@ -1447,8 +1447,10 @@ static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb,
|
||||
height - y - (xmb->cursor.size/2),
|
||||
xmb->cursor.size,
|
||||
xmb->cursor.size,
|
||||
gl->shader, &coords, &mymat, true, xmb->textures.list[XMB_TEXTURE_POINTER].id, 4,
|
||||
gl->shader, &coords, &mymat, xmb->textures.list[XMB_TEXTURE_POINTER].id, 4,
|
||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||
|
||||
menu_display_draw_icon_blend_end(gl);
|
||||
}
|
||||
|
||||
static void xmb_render(void)
|
||||
|
@ -1051,22 +1051,24 @@ static void zarch_frame(void)
|
||||
zarch_zui_draw_cursor(gl, zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_X), zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_Y));
|
||||
|
||||
|
||||
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
|
||||
|
||||
if (!zarch_zui_input_state(zui, MENU_ZARCH_PRESSED))
|
||||
zui->item.active = 0;
|
||||
else if (zui->item.active == 0)
|
||||
zui->item.active = -1;
|
||||
|
||||
menu_display_draw_icon_blend_begin(gl);
|
||||
|
||||
menu_display_draw_frame(
|
||||
0,
|
||||
0,
|
||||
zui->width,
|
||||
zui->height,
|
||||
gl->shader, (struct gfx_coords*)&zui->ca,
|
||||
&zui->mvp, true, zui->textures.white, zui->ca.coords.vertices,
|
||||
&zui->mvp, zui->textures.white, zui->ca.coords.vertices,
|
||||
MENU_DISPLAY_PRIM_TRIANGLES);
|
||||
|
||||
menu_display_draw_icon_blend_end(gl);
|
||||
|
||||
menu_display_frame_background(menu, settings,
|
||||
gl, zui->width, zui->height,
|
||||
zui->textures.bg.id, 0.75f, false,
|
||||
|
@ -530,7 +530,6 @@ void menu_display_draw_frame(
|
||||
const void *shader_data,
|
||||
struct gfx_coords *coords,
|
||||
math_matrix_4x4 *mat,
|
||||
bool blend,
|
||||
GLuint texture,
|
||||
size_t vertex_count,
|
||||
enum menu_display_prim_type prim_type
|
||||
@ -549,13 +548,7 @@ void menu_display_draw_frame(
|
||||
shader->set_coords(coords);
|
||||
shader->set_mvp(driver->video_data, mat);
|
||||
|
||||
if (blend)
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
glDrawArrays(menu_display_prim_to_gl_enum(prim_type), 0, vertex_count);
|
||||
|
||||
if (blend)
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
void menu_display_frame_background(
|
||||
@ -594,10 +587,14 @@ void menu_display_frame_background(
|
||||
&& !force_transparency
|
||||
&& texture)
|
||||
coords.color = (const float*)coord_color2;
|
||||
|
||||
menu_display_draw_icon_blend_begin(gl);
|
||||
|
||||
menu_display_draw_frame(0, 0, width, height,
|
||||
gl->shader, &coords,
|
||||
&gl->mvp_no_rot, true, texture, vertex_count, prim_type);
|
||||
&gl->mvp_no_rot, texture, vertex_count, prim_type);
|
||||
|
||||
menu_display_draw_icon_blend_end(gl);
|
||||
|
||||
gl->coords.color = gl->white_color_ptr;
|
||||
}
|
||||
|
@ -99,7 +99,6 @@ void menu_display_draw_frame(
|
||||
const void *shader,
|
||||
struct gfx_coords *coords,
|
||||
math_matrix_4x4 *mat,
|
||||
bool blend,
|
||||
GLuint texture,
|
||||
size_t vertex_count,
|
||||
enum menu_display_prim_type prim_type
|
||||
|
Loading…
Reference in New Issue
Block a user