(GL menu display driver) Don't go through

video_driver_set_coords/video_driver_set_mvp
This commit is contained in:
twinaphex 2019-03-18 04:39:54 +01:00
parent a8a06d498c
commit 8361253b52

View File

@ -103,8 +103,6 @@ static void menu_display_gl_viewport(menu_display_ctx_draw_t *draw,
static void menu_display_gl_draw(menu_display_ctx_draw_t *draw,
video_frame_info_t *video_info)
{
video_shader_ctx_mvp_t mvp;
video_shader_ctx_coords_t coords;
gl_t *gl = (gl_t*)video_info->userdata;
if (!gl || !draw)
@ -121,16 +119,13 @@ static void menu_display_gl_draw(menu_display_ctx_draw_t *draw,
if (draw)
glBindTexture(GL_TEXTURE_2D, (GLuint)draw->texture);
coords.handle_data = gl;
coords.data = draw->coords;
gl->shader->set_coords(gl,
gl->shader_data, draw->coords);
video_driver_set_coords(&coords);
gl->shader->set_mvp(gl, gl->shader_data,
draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data
: (math_matrix_4x4*)menu_display_gl_get_default_mvp(video_info));
mvp.data = gl;
mvp.matrix = draw->matrix_data ? (math_matrix_4x4*)draw->matrix_data
: (math_matrix_4x4*)menu_display_gl_get_default_mvp(video_info);
video_driver_set_mvp(&mvp);
glDrawArrays(menu_display_prim_to_gl_enum(
draw->prim_type), 0, draw->coords->vertices);