Fix background rendering

Removes the use of GL_SCISSOR_TEST in the GL display driver.

Fixes #5534
This commit is contained in:
Rob Loach 2017-10-11 21:30:57 -04:00
parent c68db61188
commit 1b856f7a1e
No known key found for this signature in database
GPG Key ID: 627C60834A74A21A

View File

@ -83,7 +83,6 @@ static void menu_display_gl_blend_begin(void)
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_SCISSOR_TEST);
shader_info.data = NULL; shader_info.data = NULL;
shader_info.idx = VIDEO_SHADER_STOCK_BLEND; shader_info.idx = VIDEO_SHADER_STOCK_BLEND;
@ -95,14 +94,13 @@ static void menu_display_gl_blend_begin(void)
static void menu_display_gl_blend_end(void) static void menu_display_gl_blend_end(void)
{ {
glDisable(GL_BLEND); glDisable(GL_BLEND);
glDisable(GL_SCISSOR_TEST);
} }
static void menu_display_gl_viewport(void *data) static void menu_display_gl_viewport(void *data)
{ {
gl_t *gl = (gl_t*)video_driver_get_ptr(false); gl_t *gl = (gl_t*)video_driver_get_ptr(false);
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data; menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
if (!gl || !draw) if (!gl || !draw)
return; return;
glViewport(draw->x, draw->y, draw->width, draw->height); glViewport(draw->x, draw->y, draw->width, draw->height);
@ -111,7 +109,7 @@ static void menu_display_gl_viewport(void *data)
static void menu_display_gl_bind_texture(void *data) static void menu_display_gl_bind_texture(void *data)
{ {
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data; menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
if (!draw) if (!draw)
return; return;
@ -124,7 +122,7 @@ static void menu_display_gl_draw(void *data)
video_shader_ctx_coords_t coords; video_shader_ctx_coords_t coords;
gl_t *gl = (gl_t*)video_driver_get_ptr(false); gl_t *gl = (gl_t*)video_driver_get_ptr(false);
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data; menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
if (!gl || !draw) if (!gl || !draw)
return; return;
@ -140,11 +138,11 @@ static void menu_display_gl_draw(void *data)
coords.handle_data = gl; coords.handle_data = gl;
coords.data = draw->coords; coords.data = draw->coords;
video_shader_driver_set_coords(coords); video_shader_driver_set_coords(coords);
mvp.data = gl; mvp.data = gl;
mvp.matrix = draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data mvp.matrix = draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data
: (math_matrix_4x4*)menu_display_gl_get_default_mvp(); : (math_matrix_4x4*)menu_display_gl_get_default_mvp();
video_shader_driver_set_mvp(mvp); video_shader_driver_set_mvp(mvp);
@ -208,7 +206,7 @@ static void menu_display_gl_draw_pipeline(void *data)
uniform_param.result.f.v0 = t; uniform_param.result.f.v0 = t;
video_shader_driver_set_parameter(uniform_param); video_shader_driver_set_parameter(uniform_param);
break; break;
} }
@ -252,7 +250,7 @@ static bool menu_display_gl_font_init_first(
{ {
font_data_t **handle = (font_data_t**)font_handle; font_data_t **handle = (font_data_t**)font_handle;
if (!(*handle = font_driver_init_first(video_data, if (!(*handle = font_driver_init_first(video_data,
font_path, font_size, true, font_path, font_size, true,
is_threaded, is_threaded,
FONT_DRIVER_RENDER_OPENGL_API))) FONT_DRIVER_RENDER_OPENGL_API)))
return false; return false;