Simplify menu_video_frame_background

This commit is contained in:
twinaphex 2015-09-06 20:53:52 +02:00
parent b781ab8ef5
commit 54a9910c0d
4 changed files with 13 additions and 24 deletions

View File

@ -404,7 +404,8 @@ static void glui_frame(void)
}
}
menu_video_frame_background(menu, settings,
gl, glui->textures.bg.id, 0.75f, false, &coord_color[0]);
gl, glui->textures.bg.id, 0.75f, false, &coord_color[0],
&glui_vertexes[0], &glui_tex_coords[0]);
menu_entries_get_title(title, sizeof(title));

View File

@ -1620,7 +1620,8 @@ static void xmb_frame(void)
}
menu_video_frame_background(menu, settings,
gl, xmb->textures.bg.id, xmb->alpha, false, &coord_color[0]);
gl, xmb->textures.bg.id, xmb->alpha, false, &coord_color[0],
&rmb_vertex[0], &rmb_tex_coord[0]);
xmb_draw_text(menu, xmb,
xmb->title_name, xmb->margins.title.left,
@ -1703,7 +1704,8 @@ static void xmb_frame(void)
if (render_background)
{
menu_video_frame_background(menu, settings, gl,
xmb->textures.bg.id, xmb->alpha, true, &coord_color[0]);
xmb->textures.bg.id, xmb->alpha, true, &coord_color[0],
&rmb_vertex[0], &rmb_tex_coord[0]);
xmb_frame_messagebox(msg);
}

View File

@ -56,32 +56,16 @@ void menu_video_frame_background(
GLuint texture,
float handle_alpha,
bool force_transparency,
GRfloat *coord_color)
GRfloat *coord_color,
const GRfloat *vertex,
const GRfloat *tex_coord)
{
struct gfx_coords coords;
unsigned width, height;
GRfloat color[16], vertex[8], tex_coord[8];
GRfloat color[16];
global_t *global = global_get_ptr();
vertex[0] = 0;
vertex[1] = 0;
vertex[2] = 1;
vertex[3] = 0;
vertex[4] = 0;
vertex[5] = 1;
vertex[6] = 1;
vertex[7] = 1;
tex_coord[0] = 0;
tex_coord[1] = 1;
tex_coord[2] = 1;
tex_coord[3] = 1;
tex_coord[4] = 0;
tex_coord[5] = 0;
tex_coord[6] = 1;
tex_coord[7] = 0;
color[ 0] = 1.0f;
color[ 1] = 1.0f;
color[ 2] = 1.0f;

View File

@ -43,7 +43,9 @@ void menu_video_frame_background(
GLuint texture,
float handle_alpha,
bool force_transparency,
GRfloat *color);
GRfloat *color,
const GRfloat *vertex,
const GRfloat *tex_coord);
#endif
const char *menu_video_get_ident(void);