| 1 |
|
| 2 |
|
| 3 |
#pragma once |
| 4 |
#include <stdbool.h> |
| 5 |
|
| 6 |
#include <X11/Xlib.h> |
| 7 |
#include <epoxy/glx.h> |
| 8 |
#include <xcb/render.h> |
| 9 |
#include <xcb/xcb.h> |
| 10 |
|
| 11 |
#include "x.h" |
| 12 |
|
| 13 |
struct glx_fbconfig_info { |
| 14 |
GLXFBConfig cfg; |
| 15 |
int texture_tgts; |
| 16 |
int texture_fmt; |
| 17 |
int y_inverted; |
| 18 |
}; |
| 19 |
|
| 20 |
bool glx_find_fbconfig(struct x_connection *c, struct xvisual_info m, |
| 21 |
struct glx_fbconfig_info *info); |
| 22 |
|
| 23 |
#define GLX_EXTS \ |
| 24 |
X(SGI_video_sync) \ |
| 25 |
X(SGI_swap_control) \ |
| 26 |
X(OML_sync_control) \ |
| 27 |
X(MESA_swap_control) \ |
| 28 |
X(EXT_swap_control) \ |
| 29 |
X(EXT_texture_from_pixmap) \ |
| 30 |
X(ARB_create_context) \ |
| 31 |
X(EXT_buffer_age) \ |
| 32 |
X(ARB_create_context_robustness) |
| 33 |
|
| 34 |
struct glxext_info { |
| 35 |
bool initialized; |
| 36 |
#define X(name) bool has_##name; |
| 37 |
GLX_EXTS |
| 38 |
#undef X |
| 39 |
#ifdef GLX_MESA_query_renderer |
| 40 |
bool has_MESA_query_renderer; |
| 41 |
#endif |
| 42 |
}; |
| 43 |
|
| 44 |
extern struct glxext_info glxext; |
| 45 |
|
| 46 |
void glxext_init(Display *, int screen); |