summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/osd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-05 13:39:20 +0200
committerwm4 <wm4@nowhere>2017-08-05 13:44:30 +0200
commitdd096863fa00f1c0c9268932a46ddc321122f552 (patch)
tree49956dd4bcd2a0d12e298107f7aeeff7a61e28e4 /video/out/opengl/osd.h
parent8dd4ae13ffd5ff11b97b84bbb4fdfe6185eeeb50 (diff)
downloadmpv-dd096863fa00f1c0c9268932a46ddc321122f552.tar.bz2
mpv-dd096863fa00f1c0c9268932a46ddc321122f552.tar.xz
vo_opengl: make OSD code use ra for textures
This requires a silly extension to ra_fns.tex_upload: since the OSD texture can be much larger than the actual OSD image data to upload, a mechanism for uploading only to a small part of the texture is needed. Otherwise, we'd have to realloc/copy the data, just to pad it, and then pay for uploading the padding too. The RA_TEX_UPLOAD_DISCARD flag is not interpreted by GL (not sure how you'd tell GL about this), but it clarifies the API and might be helpful if we support other backend APIs in the future.
Diffstat (limited to 'video/out/opengl/osd.h')
-rw-r--r--video/out/opengl/osd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/osd.h b/video/out/opengl/osd.h
index 36926f95f0..89d52f313e 100644
--- a/video/out/opengl/osd.h
+++ b/video/out/opengl/osd.h
@@ -9,7 +9,8 @@
#include "shader_cache.h"
#include "sub/osd.h"
-struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, struct osd_state *osd);
+struct mpgl_osd *mpgl_osd_init(struct ra *ra, struct mp_log *log,
+ struct osd_state *osd);
void mpgl_osd_destroy(struct mpgl_osd *ctx);
void mpgl_osd_set_options(struct mpgl_osd *ctx, bool pbo);