(GL) Use set_coords function directly

This commit is contained in:
twinaphex 2019-02-05 02:24:13 +01:00
parent ba9de324bf
commit 1b79f08715

View File

@ -588,7 +588,6 @@ static void gl2_renderchain_render(
const struct video_tex_info *feedback_info)
{
int i;
video_shader_ctx_coords_t coords;
video_shader_ctx_params_t params;
static GLfloat fbo_tex_coords[8] = {0.0f};
struct video_tex_info fbo_tex_info[GFX_MAX_SHADERS];
@ -667,10 +666,8 @@ static void gl2_renderchain_render(
gl->coords.vertices = 4;
coords.handle_data = NULL;
coords.data = &gl->coords;
video_driver_set_coords(&coords);
gl->shader->set_coords(gl,
gl->shader_data, &gl->coords);
gl->shader->set_mvp(gl, gl->shader_data,
&gl->mvp);
@ -743,10 +740,8 @@ static void gl2_renderchain_render(
gl->coords.vertices = 4;
coords.handle_data = NULL;
coords.data = &gl->coords;
video_driver_set_coords(&coords);
gl->shader->set_coords(gl,
gl->shader_data, &gl->coords);
gl->shader->set_mvp(gl, gl->shader_data,
&gl->mvp);
@ -1988,7 +1983,6 @@ static void gl_overlay_tex_geom(void *data,
static void gl_render_overlay(gl_t *gl, video_frame_info_t *video_info)
{
video_shader_ctx_coords_t coords;
unsigned i;
unsigned width = video_info->width;
unsigned height = video_info->height;
@ -2008,10 +2002,8 @@ static void gl_render_overlay(gl_t *gl, video_frame_info_t *video_info)
gl->coords.color = gl->overlay_color_coord;
gl->coords.vertices = 4 * gl->overlays;
coords.handle_data = NULL;
coords.data = &gl->coords;
video_driver_set_coords(&coords);
gl->shader->set_coords(gl,
gl->shader_data, &gl->coords);
gl->shader->set_mvp(gl, gl->shader_data,
&gl->mvp_no_rot);
@ -2323,7 +2315,6 @@ static void gl_render_osd_background(
gl_t *gl, video_frame_info_t *video_info,
const char *msg)
{
video_shader_ctx_coords_t coords_data;
video_coords_t coords;
struct uniform_info uniform_param;
float colors[4];
@ -2381,9 +2372,6 @@ static void gl_render_osd_background(
coords.lut_tex_coord = dummy;
coords.vertices = vertices_total;
coords_data.handle_data = NULL;
coords_data.data = &coords;
video_driver_set_viewport(video_info->width,
video_info->height, true, false);
@ -2391,7 +2379,8 @@ static void gl_render_osd_background(
video_info->shader_driver->use(gl,
video_info->shader_data, VIDEO_SHADER_STOCK_BLEND, true);
video_driver_set_coords(&coords_data);
gl->shader->set_coords(gl, gl->shader_data,
&coords);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@ -2465,7 +2454,6 @@ static struct video_shader *gl_get_current_shader(void *data)
#if defined(HAVE_MENU)
static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info)
{
video_shader_ctx_coords_t coords;
GLfloat color[16];
unsigned width = video_info->width;
unsigned height = video_info->height;
@ -2499,10 +2487,8 @@ static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info)
gl->coords.vertices = 4;
coords.handle_data = NULL;
coords.data = &gl->coords;
video_driver_set_coords(&coords);
gl->shader->set_coords(gl,
gl->shader_data, &gl->coords);
gl->shader->set_mvp(gl, gl->shader_data,
&gl->mvp_no_rot);
@ -2555,7 +2541,6 @@ static bool gl_frame(void *data, const void *frame,
unsigned pitch, const char *msg,
video_frame_info_t *video_info)
{
video_shader_ctx_coords_t coords;
video_shader_ctx_params_t params;
struct video_tex_info feedback_info;
gl_t *gl = (gl_t*)data;
@ -2702,10 +2687,9 @@ static bool gl_frame(void *data, const void *frame,
gl->shader->set_params(&params, gl->shader_data);
gl->coords.vertices = 4;
coords.handle_data = NULL;
coords.data = &gl->coords;
video_driver_set_coords(&coords);
gl->shader->set_coords(gl,
gl->shader_data, &gl->coords);
gl->shader->set_mvp(gl, gl->shader_data,
&gl->mvp);