From 62ddc85d178e647e8cfbee6da4d173c661b4f1fc Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 20 Sep 2017 10:45:33 +0200 Subject: vo_gpu: simplify structs / names Due to the plethora of historical baggage from different eras getting confusing, I decided to simplify and unify the struct organization and naming scheme. Structs that got renamed: 1. fbodst -> ra_fbo (and moved to gpu/context.h) 2. fbotex -> removed (redundant after 2af2fa7a) 3. fbosurface -> surface 4. img_tex -> image In addition to these structs being renamed, all of the names have been made consistent. The new scheme is as follows: struct image img; struct ra_tex *tex; struct ra_fbo fbo; This also affects derived names, e.g. indirect_fbo -> indirect_tex. Notably also, finish_pass_fbo -> finish_pass_tex and finish_pass_direct -> finish_pass_fbo. The new equivalent of fbotex_change() is called ra_tex_resize(). This commit (should) contain no logic changes, just renaming a bunch of crap. --- video/out/vo_opengl_cb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'video/out/vo_opengl_cb.c') diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c index e46f4d6ff7..6d672a7129 100644 --- a/video/out/vo_opengl_cb.c +++ b/video/out/vo_opengl_cb.c @@ -335,11 +335,10 @@ int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int vp_w, int vp_h) MP_STATS(ctx, "glcb-render"); struct ra_swapchain *sw = ctx->ra_ctx->swapchain; + struct ra_fbo target; ra_gl_ctx_resize(sw, vp_w, abs(vp_h), fbo); - struct fbodst target = { - .tex = ra_gl_ctx_start_frame(sw), - .flip = vp_h < 0, - }; + ra_gl_ctx_start_frame(sw, &target); + target.flip = vp_h < 0; gl_video_render_frame(ctx->renderer, frame, target); ra_gl_ctx_submit_frame(sw, frame); -- cgit v1.2.3