From 1f944afff702a096427b0010addd034046732f41 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 13 May 2018 06:34:15 +0200 Subject: [PATCH] (GL) Cleanups --- gfx/drivers/gl.c | 4 ++-- gfx/drivers_renderchain/gl2_renderchain.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 9b0daff631..ab90060c0e 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -262,7 +262,8 @@ static void gl_set_projection(gl_t *gl, matrix_4x4_multiply(gl->mvp, rot, gl->mvp_no_rot); } -void gl_set_viewport(void *data, video_frame_info_t *video_info, +void gl_set_viewport(gl_t *gl, + video_frame_info_t *video_info, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate) @@ -271,7 +272,6 @@ void gl_set_viewport(void *data, video_frame_info_t *video_info, int x = 0; int y = 0; float device_aspect = (float)viewport_width / viewport_height; - gl_t *gl = (gl_t*)data; unsigned height = video_info->height; aspect_data.aspect = &device_aspect; diff --git a/gfx/drivers_renderchain/gl2_renderchain.c b/gfx/drivers_renderchain/gl2_renderchain.c index 94d03d40a1..0113bab0e2 100644 --- a/gfx/drivers_renderchain/gl2_renderchain.c +++ b/gfx/drivers_renderchain/gl2_renderchain.c @@ -177,13 +177,12 @@ void gl_load_texture_data( const void *frame, unsigned base_size); void gl_set_viewport( - void *data, video_frame_info_t *video_info, + gl_t *gl, video_frame_info_t *video_info, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate); static void gl2_renderchain_convert_geometry( - void *data, struct video_fbo_rect *fbo_rect, struct gfx_fbo_scale *fbo_scale, unsigned last_width, unsigned last_max_width, @@ -757,7 +756,7 @@ static void gl2_renderchain_recompute_pass_sizes( struct gfx_fbo_scale *fbo_scale = &chain->fbo_scale[i]; gl2_renderchain_convert_geometry( - gl, fbo_rect, fbo_scale, + fbo_rect, fbo_scale, last_width, last_max_width, last_height, last_max_height, vp_width, vp_height