summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-19 12:59:07 +0100
committerwm4 <wm4@nowhere>2015-12-19 14:14:12 +0100
commit6154c1d06d38bd236a0adb57556f7d871b75469b (patch)
treeb99c5a3a50411cdddfeb8a2d2d85660d8ed349c2 /video/out/opengl/common.h
parent32cd85bc7ecfa74d3fefef5570e4ef546ae0643a (diff)
downloadmpv-6154c1d06d38bd236a0adb57556f7d871b75469b.tar.bz2
mpv-6154c1d06d38bd236a0adb57556f7d871b75469b.tar.xz
vo_opengl: split backend code from common.c to context.c
Now common.c only contains the code for the function loader, while context.c contains the backend loader/dispatcher. Not calling it "backend.c", because the central struct is called MPGLContext.
Diffstat (limited to 'video/out/opengl/common.h')
-rw-r--r--video/out/opengl/common.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h
index f376a41f6a..c2eb0e9c2e 100644
--- a/video/out/opengl/common.h
+++ b/video/out/opengl/common.h
@@ -75,76 +75,6 @@ enum {
#define MPGL_VER_P(ver) MPGL_VER_GET_MAJOR(ver), MPGL_VER_GET_MINOR(ver)
-enum {
- VOFLAG_GLES = 1 << 0, // Hint to create a GLES2 context
- VOFLAG_NO_GLES = 1 << 1, // Hint to create a desktop GL context
- VOFLAG_GL_DEBUG = 1 << 2, // Hint to request debug OpenGL context
- VOFLAG_ALPHA = 1 << 3, // Hint to request alpha framebuffer
- VOFLAG_SW = 1 << 4, // Hint to accept a software GL renderer
-};
-
-struct MPGLContext;
-
-// A windowing backend (like X11, win32, ...), which provides OpenGL rendering.
-struct mpgl_driver {
- const char *name;
-
- // Size of the struct allocated for MPGLContext.priv
- int priv_size;
-
- // Init the GL context and possibly the underlying VO backend.
- // The created context should be compatible to GL 3.2 core profile, but
- // some other GL versions are supported as well (e.g. GL 2.1 or GLES 2).
- // Return 0 on success, negative value (-1) on error.
- int (*init)(struct MPGLContext *ctx, int vo_flags);
-
- // Resize the window, or create a new window if there isn't one yet.
- // Currently, there is an unfortunate interaction with ctx->vo, and
- // display size etc. are determined by it.
- // Return 0 on success, negative value (-1) on error.
- int (*reconfig)(struct MPGLContext *ctx);
-
- // Present the frame.
- void (*swap_buffers)(struct MPGLContext *ctx);
-
- // This behaves exactly like vo_driver.control().
- int (*control)(struct MPGLContext *ctx, int *events, int request, void *arg);
-
- // Destroy the GL context and possibly the underlying VO backend.
- void (*uninit)(struct MPGLContext *ctx);
-};
-
-typedef struct MPGLContext {
- GL *gl;
- struct vo *vo;
- const struct mpgl_driver *driver;
-
- // For hwdec_vaegl.c.
- const char *native_display_type;
- void *native_display;
-
- // Windows-specific hack. See vo_opengl dwmflush suboption.
- int dwm_flush_opt;
-
- // Flip the rendered image vertically. This is useful for dxinterop.
- bool flip_v;
-
- // For free use by the mpgl_driver.
- void *priv;
-} MPGLContext;
-
-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_swap_buffers(struct MPGLContext *ctx);
-
-int mpgl_find_backend(const char *name);
-
-struct m_option;
-int mpgl_validate_backend_opt(struct mp_log *log, const struct m_option *opt,
- struct bstr name, struct bstr param);
-
void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
const char *ext2, struct mp_log *log);
void mpgl_load_functions2(GL *gl, void *(*get_fn)(void *ctx, const char *n),