diff options
author | Niklas Haas <git@haasn.xyz> | 2017-09-20 10:45:33 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-09-22 16:58:55 +0200 |
commit | 62ddc85d178e647e8cfbee6da4d173c661b4f1fc (patch) | |
tree | ab58cbd56fe8a6251ada92f7b75e002e52e0d430 /video/out/gpu/osd.c | |
parent | 2af2fa7a27586f6938f4db8f45e316212e18e442 (diff) | |
download | mpv-62ddc85d178e647e8cfbee6da4d173c661b4f1fc.tar.bz2 mpv-62ddc85d178e647e8cfbee6da4d173c661b4f1fc.tar.xz |
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.
Diffstat (limited to 'video/out/gpu/osd.c')
-rw-r--r-- | video/out/gpu/osd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/gpu/osd.c b/video/out/gpu/osd.c index f7c325d1db..350736461c 100644 --- a/video/out/gpu/osd.c +++ b/video/out/gpu/osd.c @@ -291,7 +291,7 @@ static void get_3d_side_by_side(int stereo_mode, int div[2]) } void mpgl_osd_draw_finish(struct mpgl_osd *ctx, int index, - struct gl_shader_cache *sc, struct fbodst target) + struct gl_shader_cache *sc, struct ra_fbo fbo) { struct mpgl_osd_part *part = ctx->parts[index]; @@ -303,7 +303,7 @@ void mpgl_osd_draw_finish(struct mpgl_osd *ctx, int index, for (int x = 0; x < div[0]; x++) { for (int y = 0; y < div[1]; y++) { struct gl_transform t; - gl_transform_ortho_fbodst(&t, target); + gl_transform_ortho_fbo(&t, fbo); float a_x = ctx->osd_res.w * x; float a_y = ctx->osd_res.h * y; @@ -317,7 +317,7 @@ void mpgl_osd_draw_finish(struct mpgl_osd *ctx, int index, const int *factors = &blend_factors[part->format][0]; gl_sc_blend(sc, factors[0], factors[1], factors[2], factors[3]); - gl_sc_dispatch_draw(sc, target.tex, part->vertices, part->num_vertices); + gl_sc_dispatch_draw(sc, fbo.tex, part->vertices, part->num_vertices); } static void set_res(struct mpgl_osd *ctx, struct mp_osd_res res, int stereo_mode) |