mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Remove video_context_driver_make_current
This commit is contained in:
parent
029f1c403e
commit
ca5e51f116
@ -67,7 +67,11 @@ static void gl1_raster_font_free_font(void *data,
|
|||||||
font->font_driver->free(font->font_data);
|
font->font_driver->free(font->font_data);
|
||||||
|
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(true);
|
if (
|
||||||
|
font->gl &&
|
||||||
|
font->gl->ctx_driver &&
|
||||||
|
font->gl->ctx_driver->make_current)
|
||||||
|
font->gl->ctx_driver->make_current(true);
|
||||||
|
|
||||||
glDeleteTextures(1, &font->tex);
|
glDeleteTextures(1, &font->tex);
|
||||||
|
|
||||||
@ -176,7 +180,11 @@ static void *gl1_raster_font_init_font(void *data,
|
|||||||
RARCH_LOG("[Font]: Using font driver GL1\n");
|
RARCH_LOG("[Font]: Using font driver GL1\n");
|
||||||
|
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(false);
|
if (
|
||||||
|
font->gl &&
|
||||||
|
font->gl->ctx_driver &&
|
||||||
|
font->gl->ctx_driver->make_current)
|
||||||
|
font->gl->ctx_driver->make_current(false);
|
||||||
|
|
||||||
glGenTextures(1, &font->tex);
|
glGenTextures(1, &font->tex);
|
||||||
|
|
||||||
|
@ -65,7 +65,11 @@ static void gl_core_raster_font_free_font(void *data,
|
|||||||
font->font_driver->free(font->font_data);
|
font->font_driver->free(font->font_data);
|
||||||
|
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(true);
|
if (
|
||||||
|
font->gl &&
|
||||||
|
font->gl->ctx_driver &&
|
||||||
|
font->gl->ctx_driver->make_current)
|
||||||
|
font->gl->ctx_driver->make_current(true);
|
||||||
|
|
||||||
glDeleteTextures(1, &font->tex);
|
glDeleteTextures(1, &font->tex);
|
||||||
|
|
||||||
@ -115,7 +119,11 @@ static void *gl_core_raster_font_init_font(void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(false);
|
if (
|
||||||
|
font->gl &&
|
||||||
|
font->gl->ctx_driver &&
|
||||||
|
font->gl->ctx_driver->make_current)
|
||||||
|
font->gl->ctx_driver->make_current(false);
|
||||||
|
|
||||||
font->atlas = font->font_driver->get_atlas(font->font_data);
|
font->atlas = font->font_driver->get_atlas(font->font_data);
|
||||||
|
|
||||||
|
@ -67,7 +67,13 @@ static void gl_raster_font_free_font(void *data,
|
|||||||
font->font_driver->free(font->font_data);
|
font->font_driver->free(font->font_data);
|
||||||
|
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(true);
|
{
|
||||||
|
if (
|
||||||
|
font->gl &&
|
||||||
|
font->gl->ctx_driver &&
|
||||||
|
font->gl->ctx_driver->make_current)
|
||||||
|
font->gl->ctx_driver->make_current(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (font->tex)
|
if (font->tex)
|
||||||
{
|
{
|
||||||
@ -193,7 +199,11 @@ static void *gl_raster_font_init_font(void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(false);
|
if (
|
||||||
|
font->gl &&
|
||||||
|
font->gl->ctx_driver &&
|
||||||
|
font->gl->ctx_driver->make_current)
|
||||||
|
font->gl->ctx_driver->make_current(false);
|
||||||
|
|
||||||
glGenTextures(1, &font->tex);
|
glGenTextures(1, &font->tex);
|
||||||
|
|
||||||
|
12
retroarch.c
12
retroarch.c
@ -19179,7 +19179,8 @@ bool video_driver_texture_load(void *data,
|
|||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(false);
|
if (current_video_context.make_current)
|
||||||
|
current_video_context.make_current(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
*id = video_driver_poke->load_texture(video_driver_data, data,
|
*id = video_driver_poke->load_texture(video_driver_data, data,
|
||||||
@ -19199,7 +19200,8 @@ bool video_driver_texture_unload(uintptr_t *id)
|
|||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
if (is_threaded)
|
if (is_threaded)
|
||||||
video_context_driver_make_current(false);
|
if (current_video_context.make_current)
|
||||||
|
current_video_context.make_current(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_driver_poke->unload_texture(video_driver_data, *id);
|
video_driver_poke->unload_texture(video_driver_data, *id);
|
||||||
@ -19609,12 +19611,6 @@ bool video_context_driver_get_video_output_next(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void video_context_driver_make_current(bool release)
|
|
||||||
{
|
|
||||||
if (current_video_context.make_current)
|
|
||||||
current_video_context.make_current(release);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool video_context_driver_translate_aspect(gfx_ctx_aspect_t *aspect)
|
bool video_context_driver_translate_aspect(gfx_ctx_aspect_t *aspect)
|
||||||
{
|
{
|
||||||
if (!video_context_data || !aspect)
|
if (!video_context_data || !aspect)
|
||||||
|
@ -1843,8 +1843,6 @@ bool video_context_driver_get_video_output_prev(void);
|
|||||||
|
|
||||||
bool video_context_driver_get_video_output_next(void);
|
bool video_context_driver_get_video_output_next(void);
|
||||||
|
|
||||||
void video_context_driver_make_current(bool restore);
|
|
||||||
|
|
||||||
bool video_context_driver_set(const gfx_ctx_driver_t *data);
|
bool video_context_driver_set(const gfx_ctx_driver_t *data);
|
||||||
|
|
||||||
void video_context_driver_destroy(void);
|
void video_context_driver_destroy(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user