mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Don't use arguments for blend_begin/blend_end
This commit is contained in:
parent
c8cb03e412
commit
7c69249e63
@ -183,7 +183,7 @@ static void glui_draw_icon(gl_t *gl, glui_handle_t *glui,
|
|||||||
struct gfx_coords coords;
|
struct gfx_coords coords;
|
||||||
math_matrix_4x4 mymat, mrot, mscal;
|
math_matrix_4x4 mymat, mrot, mscal;
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
matrix_4x4_rotate_z(&mrot, rotation);
|
matrix_4x4_rotate_z(&mrot, rotation);
|
||||||
matrix_4x4_multiply(&mymat, &mrot, &gl->mvp_no_rot);
|
matrix_4x4_multiply(&mymat, &mrot, &gl->mvp_no_rot);
|
||||||
@ -205,7 +205,7 @@ static void glui_draw_icon(gl_t *gl, glui_handle_t *glui,
|
|||||||
&coords, &mymat, texture,
|
&coords, &mymat, texture,
|
||||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void glui_blit_line(float x, float y, unsigned width, unsigned height,
|
static void glui_blit_line(float x, float y, unsigned width, unsigned height,
|
||||||
@ -256,7 +256,7 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h,
|
|||||||
coords.lut_tex_coord = glui_tex_coords;
|
coords.lut_tex_coord = glui_tex_coords;
|
||||||
coords.color = coord_color;
|
coords.color = coord_color;
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
menu_display_draw_frame(
|
menu_display_draw_frame(
|
||||||
x,
|
x,
|
||||||
@ -268,7 +268,7 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h,
|
|||||||
|
|
||||||
gl->coords.color = gl->white_color_ptr;
|
gl->coords.color = gl->white_color_ptr;
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void glui_draw_scrollbar(gl_t *gl, unsigned width, unsigned height, GRfloat *coord_color)
|
static void glui_draw_scrollbar(gl_t *gl, unsigned width, unsigned height, GRfloat *coord_color)
|
||||||
@ -595,7 +595,7 @@ static void glui_draw_cursor(gl_t *gl, glui_handle_t *glui,
|
|||||||
coords.lut_tex_coord = glui_tex_coords;
|
coords.lut_tex_coord = glui_tex_coords;
|
||||||
coords.color = (const float*)color;
|
coords.color = (const float*)color;
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
menu_display_draw_frame(
|
menu_display_draw_frame(
|
||||||
x - 32,
|
x - 32,
|
||||||
@ -606,7 +606,7 @@ static void glui_draw_cursor(gl_t *gl, glui_handle_t *glui,
|
|||||||
glui->textures.list[GLUI_TEXTURE_POINTER].id,
|
glui->textures.list[GLUI_TEXTURE_POINTER].id,
|
||||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t glui_list_get_size(void *data, menu_list_type_t type)
|
static size_t glui_list_get_size(void *data, menu_list_type_t type)
|
||||||
|
@ -1391,7 +1391,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
|||||||
TEXT_ALIGN_LEFT,
|
TEXT_ALIGN_LEFT,
|
||||||
width, height);
|
width, height);
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
/* set alpha components of color */
|
/* set alpha components of color */
|
||||||
color[3] = color[7] = color[11] = color[15] = (node->alpha > xmb->alpha) ? xmb->alpha : node->alpha;
|
color[3] = color[7] = color[11] = color[15] = (node->alpha > xmb->alpha) ? xmb->alpha : node->alpha;
|
||||||
@ -1414,7 +1414,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
|||||||
0,
|
0,
|
||||||
1, &color[0]);
|
1, &color[0]);
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1434,7 +1434,7 @@ static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb,
|
|||||||
coords.lut_tex_coord = rmb_tex_coord;
|
coords.lut_tex_coord = rmb_tex_coord;
|
||||||
coords.color = (const float*)color;
|
coords.color = (const float*)color;
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
menu_display_draw_frame(
|
menu_display_draw_frame(
|
||||||
x - (xmb->cursor.size/2),
|
x - (xmb->cursor.size/2),
|
||||||
@ -1444,7 +1444,7 @@ static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb,
|
|||||||
&coords, &mymat, xmb->textures.list[XMB_TEXTURE_POINTER].id,
|
&coords, &mymat, xmb->textures.list[XMB_TEXTURE_POINTER].id,
|
||||||
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_render(void)
|
static void xmb_render(void)
|
||||||
@ -1518,7 +1518,7 @@ static void xmb_frame_horizontal_list(xmb_handle_t *xmb,
|
|||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
/* set alpha components of color */
|
/* set alpha components of color */
|
||||||
color[3] = color[7] = color[11] = color[15] = (node->alpha > xmb->alpha) ? xmb->alpha : node->alpha;
|
color[3] = color[7] = color[11] = color[15] = (node->alpha > xmb->alpha) ? xmb->alpha : node->alpha;
|
||||||
@ -1534,7 +1534,7 @@ static void xmb_frame_horizontal_list(xmb_handle_t *xmb,
|
|||||||
node->zoom,
|
node->zoom,
|
||||||
&color[0]);
|
&color[0]);
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1643,7 +1643,7 @@ static void xmb_frame(void)
|
|||||||
matrix_4x4_scale(&mscal, 1 /* scale_factor */, 1 /* scale_factor */, 1);
|
matrix_4x4_scale(&mscal, 1 /* scale_factor */, 1 /* scale_factor */, 1);
|
||||||
matrix_4x4_multiply(&mymat, &mscal, &mymat);
|
matrix_4x4_multiply(&mymat, &mscal, &mymat);
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
if (settings->menu.boxart_enable && xmb->boxart)
|
if (settings->menu.boxart_enable && xmb->boxart)
|
||||||
xmb_draw_boxart(gl, xmb, &coord_color2[0], width, height);
|
xmb_draw_boxart(gl, xmb, &coord_color2[0], width, height);
|
||||||
|
@ -1056,7 +1056,7 @@ static void zarch_frame(void)
|
|||||||
else if (zui->item.active == 0)
|
else if (zui->item.active == 0)
|
||||||
zui->item.active = -1;
|
zui->item.active = -1;
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
menu_display_draw_frame(
|
menu_display_draw_frame(
|
||||||
0,
|
0,
|
||||||
@ -1067,7 +1067,7 @@ static void zarch_frame(void)
|
|||||||
&zui->mvp, zui->textures.white,
|
&zui->mvp, zui->textures.white,
|
||||||
MENU_DISPLAY_PRIM_TRIANGLES);
|
MENU_DISPLAY_PRIM_TRIANGLES);
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
|
|
||||||
menu_display_frame_background(menu, settings,
|
menu_display_frame_background(menu, settings,
|
||||||
gl, zui->width, zui->height,
|
gl, zui->width, zui->height,
|
||||||
|
@ -503,9 +503,9 @@ static GLenum menu_display_prim_to_gl_enum(enum menu_display_prim_type prim_type
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_blend_begin(void *data)
|
void menu_display_blend_begin(void)
|
||||||
{
|
{
|
||||||
gl_t *gl = (gl_t*)data;
|
gl_t *gl = (gl_t*)video_driver_get_ptr(NULL);
|
||||||
|
|
||||||
if (!gl)
|
if (!gl)
|
||||||
return;
|
return;
|
||||||
@ -517,10 +517,8 @@ void menu_display_blend_begin(void *data)
|
|||||||
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
|
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_blend_end(void *data)
|
void menu_display_blend_end(void)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
|
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -578,7 +576,7 @@ void menu_display_frame_background(
|
|||||||
coords.lut_tex_coord = tex_coord;
|
coords.lut_tex_coord = tex_coord;
|
||||||
coords.color = (const float*)coord_color;
|
coords.color = (const float*)coord_color;
|
||||||
|
|
||||||
menu_display_blend_begin(gl);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
||||||
|
|
||||||
@ -592,7 +590,7 @@ void menu_display_frame_background(
|
|||||||
&coords, &gl->mvp_no_rot,
|
&coords, &gl->mvp_no_rot,
|
||||||
texture, prim_type);
|
texture, prim_type);
|
||||||
|
|
||||||
menu_display_blend_end(gl);
|
menu_display_blend_end();
|
||||||
|
|
||||||
gl->coords.color = gl->white_color_ptr;
|
gl->coords.color = gl->white_color_ptr;
|
||||||
}
|
}
|
||||||
|
@ -102,9 +102,9 @@ void menu_display_draw_frame(
|
|||||||
enum menu_display_prim_type prim_type
|
enum menu_display_prim_type prim_type
|
||||||
);
|
);
|
||||||
|
|
||||||
void menu_display_blend_begin(void *data);
|
void menu_display_blend_begin(void);
|
||||||
|
|
||||||
void menu_display_blend_end(void *data);
|
void menu_display_blend_end(void);
|
||||||
|
|
||||||
void menu_display_frame_background(
|
void menu_display_frame_background(
|
||||||
menu_handle_t *menu,
|
menu_handle_t *menu,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user