summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-03-20 13:37:47 +0100
committerwm4 <wm4@nowhere>2017-03-20 13:37:47 +0100
commitb0cbda84ed923c8915642443b7cf5de5a2ba7b26 (patch)
treef55fce180487486f332dd73c6ffb9928187d4f2c /video/out/opengl/context.h
parent8fb9cc253457a58c39013906643e8dc92171adbe (diff)
downloadmpv-b0cbda84ed923c8915642443b7cf5de5a2ba7b26.tar.bz2
mpv-b0cbda84ed923c8915642443b7cf5de5a2ba7b26.tar.xz
vo_opengl: add a backend start_frame callback for context_vdpau
Might be useful for other backends too. For context_vdpau, resize handling, presentation, and handling the mapping state becomes somewhat less awkward.
Diffstat (limited to 'video/out/opengl/context.h')
-rw-r--r--video/out/opengl/context.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/opengl/context.h b/video/out/opengl/context.h
index 7eabbd4886..229c5ef54f 100644
--- a/video/out/opengl/context.h
+++ b/video/out/opengl/context.h
@@ -59,6 +59,11 @@ struct mpgl_driver {
// Return 0 on success, negative value (-1) on error.
int (*reconfig)(struct MPGLContext *ctx);
+ // Called when rendering starts. The backend can map or resize the
+ // framebuffer, or update GL.main_fb. swap_buffers() ends the frame.
+ // Optional.
+ void (*start_frame)(struct MPGLContext *ctx);
+
// Present the frame.
void (*swap_buffers)(struct MPGLContext *ctx);
@@ -99,6 +104,7 @@ MPGLContext *mpgl_init(struct vo *vo, const char *backend_name, int vo_flags);
void mpgl_uninit(MPGLContext *ctx);
int mpgl_reconfig_window(struct MPGLContext *ctx);
int mpgl_control(struct MPGLContext *ctx, int *events, int request, void *arg);
+void mpgl_start_frame(struct MPGLContext *ctx);
void mpgl_swap_buffers(struct MPGLContext *ctx);
int mpgl_find_backend(const char *name);