RetroArch/gfx/drivers_context/glx_ctx.c

599 lines
16 KiB
C
Raw Normal View History

2012-09-29 09:59:08 +00:00
/* RetroArch - A frontend for libretro.
2014-01-01 00:50:59 +00:00
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
2015-01-07 17:06:50 +00:00
* Copyright (C) 2011-2015 - Daniel De Matteis
2012-09-29 09:59:08 +00:00
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
2015-09-16 03:53:34 +00:00
#include <stdint.h>
#include <signal.h>
#include <GL/glx.h>
2012-09-29 09:59:08 +00:00
#include "../../driver.h"
2015-11-17 07:01:33 +00:00
#include "../common/gl_common.h"
2015-04-09 03:02:57 +00:00
#include "../common/x11_common.h"
2012-09-29 09:59:08 +00:00
static int (*g_pglSwapInterval)(int);
static int (*g_pglSwapIntervalSGI)(int);
static void (*g_pglSwapIntervalEXT)(Display*, GLXDrawable, int);
typedef struct gfx_ctx_glx_data
{
bool g_use_hw_ctx;
2015-03-21 22:09:55 +00:00
bool g_core_es;
bool g_core_es_core;
bool g_debug;
bool g_should_reset_mode;
bool g_is_double;
GLXWindow g_glx_win;
unsigned g_interval;
2012-09-29 09:59:08 +00:00
GLXContext g_ctx, g_hw_ctx;
GLXFBConfig g_fbc;
XF86VidModeModeInfo g_desktop_mode;
} gfx_ctx_glx_data_t;
static unsigned g_major;
static unsigned g_minor;
2012-09-29 09:59:08 +00:00
2014-11-06 00:47:11 +00:00
static PFNGLXCREATECONTEXTATTRIBSARBPROC glx_create_context_attribs;
2012-09-29 09:59:08 +00:00
static int glx_nul_handler(Display *dpy, XErrorEvent *event)
{
(void)dpy;
(void)event;
return 0;
}
2015-11-18 13:34:04 +00:00
static void ctx_glx_destroy_resources(gfx_ctx_glx_data_t *glx)
{
if (!glx)
return;
x11_input_ctx_destroy();
2015-11-18 13:34:04 +00:00
if (g_x11_dpy && glx->g_ctx)
2015-11-18 13:34:04 +00:00
{
glFinish();
glXMakeContextCurrent(g_x11_dpy, None, None, NULL);
2015-11-18 13:34:04 +00:00
if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_VIDEO_CACHE_CONTEXT, NULL))
2015-11-18 13:34:04 +00:00
{
if (glx->g_hw_ctx)
glXDestroyContext(g_x11_dpy, glx->g_hw_ctx);
glXDestroyContext(g_x11_dpy, glx->g_ctx);
2015-11-18 13:34:04 +00:00
glx->g_ctx = NULL;
glx->g_hw_ctx = NULL;
}
}
if (g_x11_win)
2015-11-18 13:34:04 +00:00
{
glXDestroyWindow(g_x11_dpy, glx->g_glx_win);
2015-11-18 13:34:04 +00:00
glx->g_glx_win = 0;
/* Save last used monitor for later. */
2015-12-01 07:49:35 +00:00
x11_save_last_used_monitor(DefaultRootWindow(g_x11_dpy));
2015-11-19 10:49:09 +00:00
x11_window_destroy(false);
2015-11-18 13:34:04 +00:00
}
2015-11-19 10:55:05 +00:00
x11_colormap_destroy();
2015-11-18 13:34:04 +00:00
if (glx->g_should_reset_mode)
{
x11_exit_fullscreen(g_x11_dpy, &glx->g_desktop_mode);
2015-11-18 13:34:04 +00:00
glx->g_should_reset_mode = false;
}
if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_VIDEO_CACHE_CONTEXT, NULL) && g_x11_dpy)
2015-11-18 13:34:04 +00:00
{
XCloseDisplay(g_x11_dpy);
g_x11_dpy = NULL;
2015-11-18 13:34:04 +00:00
}
g_pglSwapInterval = NULL;
g_pglSwapIntervalSGI = NULL;
g_pglSwapIntervalEXT = NULL;
g_major = g_minor = 0;
glx->g_core_es = false;
}
static void gfx_ctx_glx_destroy(void *data)
{
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)data;
2015-11-18 13:34:04 +00:00
if (!glx)
return;
(void)data;
ctx_glx_destroy_resources(glx);
free(data);
2015-11-18 13:34:04 +00:00
}
static void gfx_ctx_glx_swap_interval(void *data, unsigned interval)
2012-09-29 09:59:08 +00:00
{
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)data;
glx->g_interval = interval;
if (g_pglSwapIntervalEXT)
{
RARCH_LOG("[GLX]: glXSwapIntervalEXT(%u)\n", glx->g_interval);
g_pglSwapIntervalEXT(g_x11_dpy, glx->g_glx_win, glx->g_interval);
}
else if (g_pglSwapInterval)
2012-09-29 09:59:08 +00:00
{
RARCH_LOG("[GLX]: glXSwapInterval(%u)\n", glx->g_interval);
if (g_pglSwapInterval(glx->g_interval) != 0)
2012-09-29 09:59:08 +00:00
RARCH_WARN("[GLX]: glXSwapInterval() failed.\n");
}
else if (g_pglSwapIntervalSGI)
{
RARCH_LOG("[GLX]: glXSwapIntervalSGI(%u)\n", glx->g_interval);
if (g_pglSwapIntervalSGI(glx->g_interval) != 0)
RARCH_WARN("[GLX]: glXSwapIntervalSGI() failed.\n");
}
2012-09-29 09:59:08 +00:00
}
static void gfx_ctx_glx_swap_buffers(void *data)
2012-09-29 09:59:08 +00:00
{
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)data;
if (glx->g_is_double)
glXSwapBuffers(g_x11_dpy, glx->g_glx_win);
2012-09-29 09:59:08 +00:00
}
static void gfx_ctx_glx_set_resize(void *data,
unsigned width, unsigned height)
2012-09-29 09:59:08 +00:00
{
(void)data;
2012-09-29 09:59:08 +00:00
(void)width;
(void)height;
}
static void *gfx_ctx_glx_init(void *data)
2012-09-29 09:59:08 +00:00
{
static const int visual_attribs[] = {
GLX_X_RENDERABLE , True,
GLX_DRAWABLE_TYPE , GLX_WINDOW_BIT,
GLX_RENDER_TYPE , GLX_RGBA_BIT,
GLX_DOUBLEBUFFER , True,
GLX_RED_SIZE , 8,
GLX_GREEN_SIZE , 8,
GLX_BLUE_SIZE , 8,
GLX_ALPHA_SIZE , 8,
GLX_DEPTH_SIZE , 0,
GLX_STENCIL_SIZE , 0,
None
};
2015-01-10 02:30:23 +00:00
int nelements, major, minor;
2015-03-21 04:55:31 +00:00
GLXFBConfig *fbcs = NULL;
2015-01-10 02:30:23 +00:00
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)calloc(1, sizeof(gfx_ctx_glx_data_t));
2015-12-10 13:05:56 +00:00
#ifndef GL_DEBUG
const struct retro_hw_render_callback *hw_render =
(const struct retro_hw_render_callback*)video_driver_callback();
2015-12-10 13:05:56 +00:00
#endif
2015-01-10 02:30:23 +00:00
if (!glx)
2015-12-10 13:05:56 +00:00
return NULL;
2015-01-10 02:30:23 +00:00
XInitThreads();
2012-09-29 09:59:08 +00:00
2015-11-19 10:07:52 +00:00
if (!x11_connect())
2012-09-30 22:11:39 +00:00
goto error;
glXQueryVersion(g_x11_dpy, &major, &minor);
2015-01-07 17:06:50 +00:00
/* GLX 1.3+ minimum required. */
if ((major * 1000 + minor) < 1003)
goto error;
2014-11-06 00:47:11 +00:00
glx_create_context_attribs = (PFNGLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
#ifdef GL_DEBUG
2014-11-04 17:59:25 +00:00
glx->g_debug = true;
#else
glx->g_debug = hw_render->debug_context;
#endif
2015-03-21 22:09:55 +00:00
/* Have to use ContextAttribs */
#ifdef HAVE_OPENGLES2
glx->g_core_es = true;
glx->g_core_es_core = true;
#else
glx->g_core_es = (g_major * 1000 + g_minor) >= 3001;
glx->g_core_es_core = (g_major * 1000 + g_minor) >= 3002;
#endif
if ((glx->g_core_es || glx->g_debug) && !glx_create_context_attribs)
goto error;
2012-09-30 22:11:39 +00:00
fbcs = glXChooseFBConfig(g_x11_dpy, DefaultScreen(g_x11_dpy),
2012-09-29 09:59:08 +00:00
visual_attribs, &nelements);
if (!fbcs)
goto error;
if (!nelements)
{
XFree(fbcs);
goto error;
}
glx->g_fbc = fbcs[0];
2012-09-29 09:59:08 +00:00
XFree(fbcs);
return glx;
2012-09-29 09:59:08 +00:00
error:
ctx_glx_destroy_resources(glx);
if (glx)
free(glx);
2015-12-01 07:42:33 +00:00
g_x11_screen = 0;
return NULL;
2012-09-29 09:59:08 +00:00
}
static bool gfx_ctx_glx_set_video_mode(void *data,
2012-09-29 09:59:08 +00:00
unsigned width, unsigned height,
bool fullscreen)
2012-09-29 09:59:08 +00:00
{
XEvent event;
bool true_full = false, windowed_full;
int val, x_off = 0, y_off = 0;
XVisualInfo *vi = NULL;
XSetWindowAttributes swa = {0};
int (*old_handler)(Display*, XErrorEvent*) = NULL;
2015-03-20 21:08:36 +00:00
settings_t *settings = config_get_ptr();
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)data;
2015-11-19 10:04:17 +00:00
x11_install_sighandlers();
2012-09-29 09:59:08 +00:00
if (!glx)
return false;
2012-10-05 12:15:54 +00:00
2015-03-20 21:08:36 +00:00
windowed_full = settings->video.windowed_fullscreen;
true_full = false;
2012-09-29 09:59:08 +00:00
vi = glXGetVisualFromFBConfig(g_x11_dpy, glx->g_fbc);
2012-09-29 09:59:08 +00:00
if (!vi)
goto error;
2015-11-19 10:55:05 +00:00
swa.colormap = g_x11_cmap = XCreateColormap(g_x11_dpy,
RootWindow(g_x11_dpy, vi->screen), vi->visual, AllocNone);
swa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask |
ButtonReleaseMask | ButtonPressMask;
2012-09-29 09:59:08 +00:00
swa.override_redirect = fullscreen ? True : False;
2012-10-05 12:15:54 +00:00
if (fullscreen && !windowed_full)
2012-09-29 09:59:08 +00:00
{
if (x11_enter_fullscreen(g_x11_dpy, width, height, &glx->g_desktop_mode))
2012-10-05 12:15:54 +00:00
{
glx->g_should_reset_mode = true;
2012-10-05 12:15:54 +00:00
true_full = true;
}
else
RARCH_ERR("[GLX]: Entering true fullscreen failed. Will attempt windowed mode.\n");
2012-09-29 09:59:08 +00:00
}
2015-03-20 21:08:36 +00:00
if (settings->video.monitor_index)
2015-12-01 07:42:33 +00:00
g_x11_screen = settings->video.monitor_index - 1;
2012-10-12 19:15:58 +00:00
2012-10-12 17:05:29 +00:00
#ifdef HAVE_XINERAMA
2015-12-01 07:42:33 +00:00
if (fullscreen || g_x11_screen != 0)
2012-10-12 17:05:29 +00:00
{
unsigned new_width = width;
unsigned new_height = height;
2015-01-10 02:30:23 +00:00
2015-12-01 07:42:33 +00:00
if (x11_get_xinerama_coord(g_x11_dpy, g_x11_screen,
&x_off, &y_off, &new_width, &new_height))
2015-12-01 07:42:33 +00:00
RARCH_LOG("[GLX]: Using Xinerama on screen #%u.\n", g_x11_screen);
2012-10-12 17:05:29 +00:00
else
RARCH_LOG("[GLX]: Xinerama is not active on screen.\n");
if (fullscreen)
{
width = new_width;
height = new_height;
}
}
#endif
RARCH_LOG("[GLX]: X = %d, Y = %d, W = %u, H = %u.\n",
x_off, y_off, width, height);
g_x11_win = XCreateWindow(g_x11_dpy, RootWindow(g_x11_dpy, vi->screen),
2012-10-12 17:05:29 +00:00
x_off, y_off, width, height, 0,
2012-09-29 09:59:08 +00:00
vi->depth, InputOutput, vi->visual,
2012-10-05 12:15:54 +00:00
CWBorderPixel | CWColormap | CWEventMask | (true_full ? CWOverrideRedirect : 0), &swa);
XSetWindowBackground(g_x11_dpy, g_x11_win, 0);
2012-09-29 09:59:08 +00:00
glx->g_glx_win = glXCreateWindow(g_x11_dpy, glx->g_fbc, g_x11_win, 0);
2013-02-14 14:40:07 +00:00
x11_set_window_attr(g_x11_dpy, g_x11_win);
2012-10-12 17:05:29 +00:00
if (fullscreen)
x11_show_mouse(g_x11_dpy, g_x11_win, false);
2012-09-29 09:59:08 +00:00
2012-10-05 12:15:54 +00:00
if (true_full)
2012-09-29 09:59:08 +00:00
{
2012-10-12 17:05:29 +00:00
RARCH_LOG("[GLX]: Using true fullscreen.\n");
XMapRaised(g_x11_dpy, g_x11_win);
2012-09-29 09:59:08 +00:00
}
2015-01-07 17:06:50 +00:00
else if (fullscreen) /* We attempted true fullscreen, but failed. Attempt using windowed fullscreen. */
{
XMapRaised(g_x11_dpy, g_x11_win);
2012-10-12 17:05:29 +00:00
RARCH_LOG("[GLX]: Using windowed fullscreen.\n");
2015-01-07 17:06:50 +00:00
/* We have to move the window to the screen we want to go fullscreen on first.
* x_off and y_off usually get ignored in XCreateWindow().
*/
x11_move_window(g_x11_dpy, g_x11_win, x_off, y_off, width, height);
x11_windowed_fullscreen(g_x11_dpy, g_x11_win);
}
2012-09-29 09:59:08 +00:00
else
2012-10-12 17:05:29 +00:00
{
XMapWindow(g_x11_dpy, g_x11_win);
2015-06-26 15:46:13 +00:00
/* If we want to map the window on a different screen, we'll have to do it by force.
* Otherwise, we should try to let the window manager sort it out.
* x_off and y_off usually get ignored in XCreateWindow(). */
2015-12-01 07:42:33 +00:00
if (g_x11_screen)
x11_move_window(g_x11_dpy, g_x11_win, x_off, y_off, width, height);
2012-10-12 17:05:29 +00:00
}
2012-09-29 09:59:08 +00:00
2015-11-19 14:05:17 +00:00
x11_event_queue_check(&event);
2012-09-29 09:59:08 +00:00
if (!glx->g_ctx)
{
2015-03-21 22:09:55 +00:00
if (glx->g_core_es || glx->g_debug)
{
int attribs[16];
int *aptr = attribs;
2015-03-21 22:09:55 +00:00
if (glx->g_core_es)
{
*aptr++ = GLX_CONTEXT_MAJOR_VERSION_ARB;
*aptr++ = g_major;
*aptr++ = GLX_CONTEXT_MINOR_VERSION_ARB;
*aptr++ = g_minor;
2015-03-21 22:09:55 +00:00
if (glx->g_core_es_core)
{
2015-03-21 22:09:55 +00:00
/* Technically, we don't have core/compat until 3.2.
* Version 3.1 is either compat or not depending on GL_ARB_compatibility.
*/
*aptr++ = GLX_CONTEXT_PROFILE_MASK_ARB;
2015-03-21 22:09:55 +00:00
#ifdef HAVE_OPENGLES2
*aptr++ = GLX_CONTEXT_ES_PROFILE_BIT_EXT;
#else
*aptr++ = GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
2015-03-21 22:09:55 +00:00
#endif
}
}
if (glx->g_debug)
{
*aptr++ = GLX_CONTEXT_FLAGS_ARB;
*aptr++ = GLX_CONTEXT_DEBUG_BIT_ARB;
}
*aptr = None;
glx->g_ctx = glx_create_context_attribs(g_x11_dpy, glx->g_fbc, NULL, True, attribs);
if (glx->g_use_hw_ctx)
{
RARCH_LOG("[GLX]: Creating shared HW context.\n");
glx->g_hw_ctx = glx_create_context_attribs(g_x11_dpy, glx->g_fbc, glx->g_ctx, True, attribs);
if (!glx->g_hw_ctx)
RARCH_ERR("[GLX]: Failed to create new shared context.\n");
}
}
else
{
glx->g_ctx = glXCreateNewContext(g_x11_dpy, glx->g_fbc, GLX_RGBA_TYPE, 0, True);
if (glx->g_use_hw_ctx)
{
glx->g_hw_ctx = glXCreateNewContext(g_x11_dpy, glx->g_fbc, GLX_RGBA_TYPE, glx->g_ctx, True);
if (!glx->g_hw_ctx)
RARCH_ERR("[GLX]: Failed to create new shared context.\n");
}
}
if (!glx->g_ctx)
{
RARCH_ERR("[GLX]: Failed to create new context.\n");
goto error;
}
}
else
2012-09-29 09:59:08 +00:00
{
video_driver_ctl(RARCH_DISPLAY_CTL_SET_VIDEO_CACHE_CONTEXT_ACK, NULL);
RARCH_LOG("[GLX]: Using cached GL context.\n");
2012-09-29 09:59:08 +00:00
}
glXMakeContextCurrent(g_x11_dpy, glx->g_glx_win, glx->g_glx_win, glx->g_ctx);
XSync(g_x11_dpy, False);
2012-09-29 09:59:08 +00:00
2015-11-19 11:18:35 +00:00
x11_install_quit_atom();
glXGetConfig(g_x11_dpy, vi, GLX_DOUBLEBUFFER, &val);
glx->g_is_double = val;
2012-09-29 09:59:08 +00:00
if (glx->g_is_double)
2012-09-29 09:59:08 +00:00
{
const char *swap_func = NULL;
2013-06-30 21:22:37 +00:00
g_pglSwapIntervalEXT = (void (*)(Display*, GLXDrawable, int))glXGetProcAddress((const GLubyte*)"glXSwapIntervalEXT");
g_pglSwapIntervalSGI = (int (*)(int))glXGetProcAddress((const GLubyte*)"glXSwapIntervalSGI");
g_pglSwapInterval = (int (*)(int))glXGetProcAddress((const GLubyte*)"glXSwapIntervalMESA");
if (g_pglSwapIntervalEXT)
swap_func = "glXSwapIntervalEXT";
else if (g_pglSwapInterval)
swap_func = "glXSwapIntervalMESA";
else if (g_pglSwapIntervalSGI)
swap_func = "glXSwapIntervalSGI";
if (!g_pglSwapInterval && !g_pglSwapIntervalEXT && !g_pglSwapIntervalSGI)
2012-09-29 09:59:08 +00:00
RARCH_WARN("[GLX]: Cannot find swap interval call.\n");
else
RARCH_LOG("[GLX]: Found swap function: %s.\n", swap_func);
2012-09-29 09:59:08 +00:00
}
else
RARCH_WARN("[GLX]: Context is not double buffered!.\n");
gfx_ctx_glx_swap_interval(data, glx->g_interval);
2012-09-29 09:59:08 +00:00
2015-01-07 17:06:50 +00:00
/* This can blow up on some drivers. It's not fatal, so override errors for this call. */
old_handler = XSetErrorHandler(glx_nul_handler);
XSetInputFocus(g_x11_dpy, g_x11_win, RevertToNone, CurrentTime);
XSync(g_x11_dpy, False);
XSetErrorHandler(old_handler);
2012-09-29 09:59:08 +00:00
XFree(vi);
2015-11-19 11:05:32 +00:00
if (!x11_input_ctx_new(true_full))
goto error;
2012-09-29 09:59:08 +00:00
return true;
error:
if (vi)
XFree(vi);
ctx_glx_destroy_resources(glx);
if (glx)
free(glx);
2015-12-01 07:42:33 +00:00
g_x11_screen = 0;
2012-09-29 09:59:08 +00:00
return false;
}
static void gfx_ctx_glx_input_driver(void *data,
const input_driver_t **input, void **input_data)
2012-09-29 09:59:08 +00:00
{
void *xinput = input_x.init();
2015-01-10 02:30:23 +00:00
(void)data;
2012-09-29 09:59:08 +00:00
*input = xinput ? &input_x : NULL;
*input_data = xinput;
}
2015-01-18 21:32:14 +00:00
static bool gfx_ctx_glx_suppress_screensaver(void *data, bool enable)
{
if (video_driver_display_type_get() != RARCH_DISPLAY_X11)
2015-01-18 21:32:14 +00:00
return false;
x11_suspend_screensaver(video_driver_window_get());
2015-01-18 21:32:14 +00:00
return true;
}
static bool gfx_ctx_glx_has_windowed(void *data)
{
(void)data;
return true;
}
static gfx_ctx_proc_t gfx_ctx_glx_get_proc_address(const char *symbol)
2012-09-29 09:59:08 +00:00
{
return glXGetProcAddress((const GLubyte*)symbol);
}
2015-01-07 17:06:50 +00:00
static bool gfx_ctx_glx_bind_api(void *data, enum gfx_ctx_api api,
unsigned major, unsigned minor)
2012-09-29 09:59:08 +00:00
{
(void)data;
2015-01-10 02:30:23 +00:00
g_major = major;
g_minor = minor;
2015-01-10 02:30:23 +00:00
2015-03-21 22:09:55 +00:00
#ifdef HAVE_OPENGLES2
Display *dpy = XOpenDisplay(NULL);
const char *exts = glXQueryExtensionsString(dpy, DefaultScreen(dpy));
bool ret = api == GFX_CTX_OPENGL_ES_API &&
exts && strstr(exts, "GLX_EXT_create_context_es2_profile");
XCloseDisplay(dpy);
if (ret && g_major < 3)
{
g_major = 2; /* ES 2.0. */
g_minor = 0;
}
return ret;
#else
2012-09-29 09:59:08 +00:00
return api == GFX_CTX_OPENGL_API;
2015-03-21 22:09:55 +00:00
#endif
2012-09-29 09:59:08 +00:00
}
static void gfx_ctx_glx_show_mouse(void *data, bool state)
2013-03-29 12:46:11 +00:00
{
x11_show_mouse(g_x11_dpy, g_x11_win, state);
2013-03-29 12:46:11 +00:00
}
static void gfx_ctx_glx_bind_hw_render(void *data, bool enable)
{
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)data;
if (!glx)
return;
(void)data;
glx->g_use_hw_ctx = enable;
2015-11-19 14:00:12 +00:00
if (!g_x11_dpy || !glx->g_glx_win)
return;
glXMakeContextCurrent(g_x11_dpy, glx->g_glx_win,
glx->g_glx_win, enable ? glx->g_hw_ctx : glx->g_ctx);
}
2012-09-29 09:59:08 +00:00
const gfx_ctx_driver_t gfx_ctx_glx = {
gfx_ctx_glx_init,
gfx_ctx_glx_destroy,
gfx_ctx_glx_bind_api,
gfx_ctx_glx_swap_interval,
gfx_ctx_glx_set_video_mode,
x11_get_video_size,
NULL, /* get_video_output_size */
NULL, /* get_video_output_prev */
NULL, /* get_video_output_next */
2015-11-19 09:25:07 +00:00
x11_get_metrics,
NULL,
2015-11-19 10:18:57 +00:00
x11_update_window_title,
x11_check_window,
gfx_ctx_glx_set_resize,
2015-11-19 09:25:07 +00:00
x11_has_focus,
2015-01-18 21:32:14 +00:00
gfx_ctx_glx_suppress_screensaver,
gfx_ctx_glx_has_windowed,
gfx_ctx_glx_swap_buffers,
gfx_ctx_glx_input_driver,
gfx_ctx_glx_get_proc_address,
NULL,
NULL,
gfx_ctx_glx_show_mouse,
2012-09-29 09:59:08 +00:00
"glx",
gfx_ctx_glx_bind_hw_render,
2012-09-29 09:59:08 +00:00
};