mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(Menu) Cleanups
This commit is contained in:
parent
5d0da65f91
commit
015ce797f9
@ -140,10 +140,8 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h,
|
||||
coords.lut_tex_coord = tex_coord;
|
||||
|
||||
coords.color = color;
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
|
||||
menu_gl_draw_frame(gl->shader, &coords, &gl->mvp_no_rot, true);
|
||||
menu_gl_draw_frame(gl->shader, &coords, &gl->mvp_no_rot, true, 0);
|
||||
|
||||
gl->coords.color = gl->white_color_ptr;
|
||||
}
|
||||
|
@ -28,9 +28,14 @@ static INLINE void menu_gl_draw_frame(
|
||||
const shader_backend_t *shader,
|
||||
struct gl_coords *coords,
|
||||
math_matrix_4x4 *mat,
|
||||
bool blend)
|
||||
bool blend,
|
||||
GLuint texture
|
||||
)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
shader->set_coords(coords);
|
||||
shader->set_mvp(driver->video_data, mat);
|
||||
|
||||
@ -100,10 +105,8 @@ static INLINE void gl_menu_frame_background(
|
||||
&& texture)
|
||||
coords.color = color;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
menu_gl_draw_frame(gl->shader, &coords,
|
||||
&gl->mvp_no_rot, true);
|
||||
&gl->mvp_no_rot, true, texture);
|
||||
|
||||
gl->coords.color = gl->white_color_ptr;
|
||||
}
|
||||
|
@ -314,7 +314,6 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb,
|
||||
coords.tex_coord = rmb_tex_coord;
|
||||
coords.lut_tex_coord = rmb_tex_coord;
|
||||
coords.color = color;
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
matrix_4x4_rotate_z(&mrot, rotation);
|
||||
matrix_4x4_multiply(&mymat, &mrot, &gl->mvp_no_rot);
|
||||
@ -322,7 +321,7 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb,
|
||||
matrix_4x4_scale(&mscal, scale_factor, scale_factor, 1);
|
||||
matrix_4x4_multiply(&mymat, &mscal, &mymat);
|
||||
|
||||
menu_gl_draw_frame(gl->shader, &coords, &mymat, false);
|
||||
menu_gl_draw_frame(gl->shader, &coords, &mymat, false, texture);
|
||||
}
|
||||
|
||||
static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
||||
@ -363,9 +362,8 @@ static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb,
|
||||
coords.tex_coord = rmb_tex_coord;
|
||||
coords.lut_tex_coord = rmb_tex_coord;
|
||||
coords.color = color;
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
menu_gl_draw_frame(gl->shader, &coords, mymat, false);
|
||||
menu_gl_draw_frame(gl->shader, &coords, mymat, false, texture);
|
||||
}
|
||||
|
||||
static void xmb_draw_text(menu_handle_t *menu,
|
||||
@ -1146,13 +1144,12 @@ static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb, float x, float y)
|
||||
coords.lut_tex_coord = rmb_tex_coord;
|
||||
coords.color = color;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, xmb->textures.list[XMB_TEXTURE_POINTER].id);
|
||||
|
||||
matrix_4x4_rotate_z(&mrot, 0);
|
||||
matrix_4x4_multiply(&mymat, &mrot, &gl->mvp_no_rot);
|
||||
|
||||
xmb_draw_icon_begin(gl);
|
||||
menu_gl_draw_frame(gl->shader, &coords, &mymat, true);
|
||||
|
||||
menu_gl_draw_frame(gl->shader, &coords, &mymat, true, xmb->textures.list[XMB_TEXTURE_POINTER].id);
|
||||
}
|
||||
|
||||
static void xmb_render(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user