mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
(Menu) Cleanups
This commit is contained in:
parent
65bd8194cd
commit
4a29f71272
@ -142,17 +142,15 @@ static void menu_display_d3d_bind_texture(void *data)
|
||||
|
||||
static void menu_display_d3d_draw(void *data)
|
||||
{
|
||||
#if 0
|
||||
math_matrix_4x4 *mat = NULL;
|
||||
d3d_video_t *d3d = (d3d_video_t*)video_driver_get_ptr(false);
|
||||
#endif
|
||||
d3d_video_t *d3d = (d3d_video_t*)video_driver_get_ptr(false);
|
||||
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
|
||||
|
||||
if (!d3d || !draw)
|
||||
return;
|
||||
|
||||
mat = (math_matrix_4x4*)draw->matrix_data;
|
||||
if (!mat)
|
||||
mat = (math_matrix_4x4*)
|
||||
menu_display_d3d_get_default_mvp();
|
||||
if (!draw->coords->vertex)
|
||||
draw->coords->vertex = menu_display_d3d_get_default_vertices();
|
||||
if (!draw->coords->tex_coord)
|
||||
@ -164,6 +162,10 @@ static void menu_display_d3d_draw(void *data)
|
||||
menu_display_d3d_bind_texture(draw);
|
||||
|
||||
#if 0
|
||||
mat = (math_matrix_4x4*)draw->matrix_data;
|
||||
if (!mat)
|
||||
mat = (math_matrix_4x4*)
|
||||
menu_display_d3d_get_default_mvp();
|
||||
video_shader_driver_set_coords(d3d, draw->coords);
|
||||
video_shader_driver_set_mvp(d3d, mat);
|
||||
#endif
|
||||
|
@ -118,17 +118,12 @@ static void menu_display_gl_draw(void *data)
|
||||
{
|
||||
video_shader_ctx_mvp_t mvp;
|
||||
video_shader_ctx_coords_t coords;
|
||||
math_matrix_4x4 *mat = NULL;
|
||||
gl_t *gl = (gl_t*)video_driver_get_ptr(false);
|
||||
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
|
||||
|
||||
if (!gl || !draw)
|
||||
return;
|
||||
|
||||
mat = (math_matrix_4x4*)draw->matrix_data;
|
||||
|
||||
if (!mat)
|
||||
mat = (math_matrix_4x4*)menu_display_gl_get_default_mvp();
|
||||
if (!draw->coords->vertex)
|
||||
draw->coords->vertex = menu_display_gl_get_default_vertices();
|
||||
if (!draw->coords->tex_coord)
|
||||
@ -145,7 +140,8 @@ static void menu_display_gl_draw(void *data)
|
||||
video_shader_driver_ctl(SHADER_CTL_SET_COORDS, &coords);
|
||||
|
||||
mvp.data = gl;
|
||||
mvp.matrix = mat;
|
||||
mvp.matrix = draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data
|
||||
: (math_matrix_4x4*)menu_display_gl_get_default_mvp();
|
||||
|
||||
video_shader_driver_ctl(SHADER_CTL_SET_MVP, &mvp);
|
||||
|
||||
|
@ -85,7 +85,6 @@ static void menu_display_vk_draw(void *data)
|
||||
const float *vertex = NULL;
|
||||
const float *tex_coord = NULL;
|
||||
const float *color = NULL;
|
||||
math_matrix_4x4 *mat = NULL;
|
||||
struct vk_vertex *pv = NULL;
|
||||
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
|
||||
vk_t *vk = (vk_t*)video_driver_get_ptr(false);
|
||||
@ -98,10 +97,6 @@ static void menu_display_vk_draw(void *data)
|
||||
tex_coord = draw->coords->tex_coord;
|
||||
color = draw->coords->color;
|
||||
|
||||
mat = (math_matrix_4x4*)draw->matrix_data;
|
||||
|
||||
if (!mat)
|
||||
mat = (math_matrix_4x4*)menu_display_vk_get_default_mvp();
|
||||
if (!vertex)
|
||||
vertex = menu_display_vk_get_default_vertices();
|
||||
if (!tex_coord)
|
||||
@ -140,7 +135,8 @@ static void menu_display_vk_draw(void *data)
|
||||
texture,
|
||||
texture->default_smooth
|
||||
? vk->samplers.linear : vk->samplers.nearest,
|
||||
mat,
|
||||
draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data
|
||||
: (math_matrix_4x4*)menu_display_vk_get_default_mvp(),
|
||||
&range,
|
||||
draw->coords->vertices,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user