diff options
Diffstat (limited to 'video/out/opengl/context.h')
-rw-r--r-- | video/out/opengl/context.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/video/out/opengl/context.h b/video/out/opengl/context.h index 2dd2517ef5..c96450ebd5 100644 --- a/video/out/opengl/context.h +++ b/video/out/opengl/context.h @@ -4,12 +4,16 @@ #include "video/out/gpu/context.h" #include "common.h" -extern const int mpgl_preferred_gl_versions[]; +extern const int mpgl_min_required_gl_versions[]; -// Returns whether or not a candidate GL version should be accepted or not -// (based on the --opengl opts). Implementations may call this before -// ra_gl_ctx_init if they wish to probe for multiple possible GL versions. -bool ra_gl_ctx_test_version(struct ra_ctx *ctx, int version, bool es); +enum gles_mode { + GLES_AUTO = 0, + GLES_YES, + GLES_NO, +}; + +// Returns the gles mode based on the --opengl opts. +enum gles_mode ra_gl_ctx_get_glesmode(struct ra_ctx *ctx); // These are a set of helpers for ra_ctx providers based on ra_gl. // The init function also initializes ctx->ra and ctx->swapchain, so the user @@ -17,6 +21,10 @@ bool ra_gl_ctx_test_version(struct ra_ctx *ctx, int version, bool es); // clean them up) struct ra_gl_ctx_params { + // For special contexts (i.e. wayland) that want to check visibility + // before drawing a frame. + bool (*check_visible)(struct ra_ctx *ctx); + // Set to the platform-specific function to swap buffers, like // glXSwapBuffers, eglSwapBuffers etc. This will be called by // ra_gl_ctx_swap_buffers. Required unless you either never call that @@ -26,11 +34,6 @@ struct ra_gl_ctx_params { // See ra_swapchain_fns.get_vsync. void (*get_vsync)(struct ra_ctx *ctx, struct vo_vsync_info *info); - // Set to false if the implementation follows normal GL semantics, which is - // upside down. Set to true if it does *not*, i.e. if rendering is right - // side up - bool flipped; - // If this is set to non-NULL, then the ra_gl_ctx will consider the GL // implementation to be using an external swapchain, which disables the // software simulation of --swapchain-depth. Any functions defined by this |