mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Get rid of texture_load/texture_unload callbacks for menu_display_driver
This commit is contained in:
parent
b1b8f2645f
commit
d3d4bc3dda
@ -232,20 +232,6 @@ static void menu_display_d3d_clear_color(float r, float g, float b, float a)
|
|||||||
d3d_clear(d3d->dev, 0, NULL, D3DCLEAR_TARGET, clear_color, 0, 0);
|
d3d_clear(d3d->dev, 0, NULL, D3DCLEAR_TARGET, clear_color, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned menu_display_d3d_texture_load(void *data, enum texture_filter_type type)
|
|
||||||
{
|
|
||||||
unsigned id;
|
|
||||||
video_driver_texture_load(data, type, &id);
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void menu_display_d3d_texture_unload(uintptr_t *id)
|
|
||||||
{
|
|
||||||
if (!id)
|
|
||||||
return;
|
|
||||||
video_driver_texture_unload(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const float *menu_display_d3d_get_tex_coords(void)
|
static const float *menu_display_d3d_get_tex_coords(void)
|
||||||
{
|
{
|
||||||
return &d3d_tex_coords[0];
|
return &d3d_tex_coords[0];
|
||||||
@ -268,8 +254,6 @@ menu_display_ctx_driver_t menu_display_ctx_d3d = {
|
|||||||
menu_display_d3d_clear_color,
|
menu_display_d3d_clear_color,
|
||||||
menu_display_d3d_get_default_mvp,
|
menu_display_d3d_get_default_mvp,
|
||||||
menu_display_d3d_get_tex_coords,
|
menu_display_d3d_get_tex_coords,
|
||||||
menu_display_d3d_texture_load,
|
|
||||||
menu_display_d3d_texture_unload,
|
|
||||||
menu_display_d3d_font_init_first,
|
menu_display_d3d_font_init_first,
|
||||||
MENU_VIDEO_DRIVER_DIRECT3D,
|
MENU_VIDEO_DRIVER_DIRECT3D,
|
||||||
"menu_display_d3d",
|
"menu_display_d3d",
|
||||||
|
@ -190,20 +190,6 @@ static void menu_display_gl_clear_color(float r, float g, float b, float a)
|
|||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned menu_display_gl_texture_load(void *data, enum texture_filter_type type)
|
|
||||||
{
|
|
||||||
unsigned id;
|
|
||||||
video_driver_texture_load(data, type, &id);
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void menu_display_gl_texture_unload(uintptr_t *id)
|
|
||||||
{
|
|
||||||
if (!id)
|
|
||||||
return;
|
|
||||||
video_driver_texture_unload(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const float *menu_display_gl_get_tex_coords(void)
|
static const float *menu_display_gl_get_tex_coords(void)
|
||||||
{
|
{
|
||||||
return &gl_tex_coords[0];
|
return &gl_tex_coords[0];
|
||||||
@ -226,8 +212,6 @@ menu_display_ctx_driver_t menu_display_ctx_gl = {
|
|||||||
menu_display_gl_clear_color,
|
menu_display_gl_clear_color,
|
||||||
menu_display_gl_get_default_mvp,
|
menu_display_gl_get_default_mvp,
|
||||||
menu_display_gl_get_tex_coords,
|
menu_display_gl_get_tex_coords,
|
||||||
menu_display_gl_texture_load,
|
|
||||||
menu_display_gl_texture_unload,
|
|
||||||
menu_display_gl_font_init_first,
|
menu_display_gl_font_init_first,
|
||||||
MENU_VIDEO_DRIVER_OPENGL,
|
MENU_VIDEO_DRIVER_OPENGL,
|
||||||
"menu_display_gl",
|
"menu_display_gl",
|
||||||
|
@ -71,15 +71,6 @@ static void menu_display_null_clear_color(float r, float g, float b, float a)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned menu_display_null_texture_load(void *data, enum texture_filter_type type)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void menu_display_null_texture_unload(uintptr_t *id)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static const float *menu_display_null_get_tex_coords(void)
|
static const float *menu_display_null_get_tex_coords(void)
|
||||||
{
|
{
|
||||||
static float floats[1] = {1.00f};
|
static float floats[1] = {1.00f};
|
||||||
@ -102,8 +93,6 @@ menu_display_ctx_driver_t menu_display_ctx_null = {
|
|||||||
menu_display_null_clear_color,
|
menu_display_null_clear_color,
|
||||||
menu_display_null_get_default_mvp,
|
menu_display_null_get_default_mvp,
|
||||||
menu_display_null_get_tex_coords,
|
menu_display_null_get_tex_coords,
|
||||||
menu_display_null_texture_load,
|
|
||||||
menu_display_null_texture_unload,
|
|
||||||
menu_display_null_font_init_first,
|
menu_display_null_font_init_first,
|
||||||
MENU_VIDEO_DRIVER_GENERIC,
|
MENU_VIDEO_DRIVER_GENERIC,
|
||||||
"menu_display_null",
|
"menu_display_null",
|
||||||
|
@ -563,22 +563,18 @@ void menu_display_matrix_4x4_rotate_z(math_matrix_4x4 *matrix, float rotation,
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned menu_display_texture_load(void *data,
|
unsigned menu_display_texture_load(void *data,
|
||||||
enum texture_filter_type filter_type)
|
enum texture_filter_type filter_type)
|
||||||
{
|
{
|
||||||
menu_display_ctx_driver_t *menu_disp = menu_display_context_get_ptr();
|
unsigned id;
|
||||||
if (!menu_disp || !menu_disp->texture_load)
|
video_driver_texture_load(data, filter_type, &id);
|
||||||
return 0;
|
return id;
|
||||||
|
|
||||||
return menu_disp->texture_load(data, filter_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_texture_unload(uintptr_t *id)
|
void menu_display_texture_unload(uintptr_t *id)
|
||||||
{
|
{
|
||||||
menu_display_ctx_driver_t *menu_disp = menu_display_context_get_ptr();
|
if (!id)
|
||||||
if (!menu_disp || !menu_disp->texture_unload)
|
|
||||||
return;
|
return;
|
||||||
|
video_driver_texture_unload(id);
|
||||||
menu_disp->texture_unload(id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_display_draw(float x, float y,
|
void menu_display_draw(float x, float y,
|
||||||
|
@ -115,8 +115,6 @@ typedef struct menu_display_ctx_driver
|
|||||||
|
|
||||||
void *(*get_default_mvp)(void);
|
void *(*get_default_mvp)(void);
|
||||||
const float *(*get_tex_coords)(void);
|
const float *(*get_tex_coords)(void);
|
||||||
unsigned (*texture_load)(void *data, enum texture_filter_type type);
|
|
||||||
void (*texture_unload)(uintptr_t *id);
|
|
||||||
bool (*font_init_first)(
|
bool (*font_init_first)(
|
||||||
void **font_handle, void *video_data, const char *font_path,
|
void **font_handle, void *video_data, const char *font_path,
|
||||||
float font_size);
|
float font_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user