summaryrefslogtreecommitdiffstats
path: root/video/out/gl_osd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-29 18:29:28 +0100
committerwm4 <wm4@nowhere>2015-01-29 18:29:28 +0100
commite0e06f0f0c9d6f00cb02b2c98b7286e231d65794 (patch)
tree1196ce3c9bbb160fd4b0768d352e67902a1b62fb /video/out/gl_osd.h
parent20c5c7e521d194c9be0fc3ee3ebdc0495afee9be (diff)
downloadmpv-e0e06f0f0c9d6f00cb02b2c98b7286e231d65794.tar.bz2
mpv-e0e06f0f0c9d6f00cb02b2c98b7286e231d65794.tar.xz
vo_opengl: move remaining OSD rendering parts to gl_osd.c
Reduces the size of gl_video.c a bit further. This also uses a separate vertex array object for OSD elements, so the video one can be simplified slightly. OSD shader generation is still in gl_video.c, which leads to the strange additional parameter to mpgl_osd_init(). The issue is that video parameters influence the OSD shader (????), and also OSD needs to go through the screen colormanagement.
Diffstat (limited to 'video/out/gl_osd.h')
-rw-r--r--video/out/gl_osd.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/video/out/gl_osd.h b/video/out/gl_osd.h
index fce87bafe4..5c34911e22 100644
--- a/video/out/gl_osd.h
+++ b/video/out/gl_osd.h
@@ -4,7 +4,7 @@
#include <stdbool.h>
#include <inttypes.h>
-#include "gl_common.h"
+#include "gl_utils.h"
#include "sub/osd.h"
struct mpgl_osd_part {
@@ -27,16 +27,18 @@ struct mpgl_osd {
struct mpgl_osd_part *parts[MAX_OSD_PARTS];
const struct osd_fmt_entry *fmt_table;
bool formats[SUBBITMAP_COUNT];
+ struct gl_vao vao;
+ GLuint *programs; // SUBBITMAP_COUNT elements
+ // temporary
+ float offset[2];
void *scratch;
};
-struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, struct osd_state *osd);
+struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, struct osd_state *osd,
+ GLuint *programs);
void mpgl_osd_destroy(struct mpgl_osd *ctx);
-struct mpgl_osd_part *mpgl_osd_generate(struct mpgl_osd *ctx,
- struct sub_bitmaps *b);
-
-void mpgl_osd_set_gl_state(struct mpgl_osd *ctx, struct mpgl_osd_part *p);
-void mpgl_osd_unset_gl_state(struct mpgl_osd *ctx, struct mpgl_osd_part *p);
+void mpgl_osd_draw(struct mpgl_osd *ctx, struct mp_osd_res res, double pts,
+ int stereo_mode);
#endif