Prevent GL/glx.h from defining prototypes

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-02-09 00:36:14 +00:00
parent 4c99ecfde4
commit 136ce7c9e8
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
12 changed files with 10 additions and 13 deletions

View File

@ -10,7 +10,6 @@
* *
*/ */
#include <GL/glx.h>
#include <X11/Xlib-xcb.h> #include <X11/Xlib-xcb.h>
#include <assert.h> #include <assert.h>
#include <limits.h> #include <limits.h>

View File

@ -2,8 +2,10 @@
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com> // Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
#pragma once #pragma once
#include <stdbool.h> #include <stdbool.h>
// Older version of glx.h defines function prototypes...
#define glXSwapIntervalMESA glXSwapIntervalMESA_
#include <GL/glx.h> #include <GL/glx.h>
#include <GL/glxext.h> #undef glXSwapIntervalMESA
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <xcb/render.h> #include <xcb/render.h>

View File

@ -54,7 +54,7 @@
#ifdef CONFIG_OPENGL #ifdef CONFIG_OPENGL
// libGL // libGL
#include <GL/glx.h> #include "backend/gl/glx.h"
// Workarounds for missing definitions in some broken GL drivers, thanks to // Workarounds for missing definitions in some broken GL drivers, thanks to
// douglasp and consolers for reporting // douglasp and consolers for reporting

View File

@ -25,7 +25,6 @@
#include <xcb/xfixes.h> #include <xcb/xfixes.h>
#include <xcb/sync.h> #include <xcb/sync.h>
#include <xcb/composite.h> #include <xcb/composite.h>
#include <GL/glx.h>
#include <ev.h> #include <ev.h>

View File

@ -70,6 +70,7 @@ module backend {
} }
module glx { module glx {
header "backend/gl/glx.h" header "backend/gl/glx.h"
export GL.glx
} }
} }
module backend { module backend {

View File

@ -9,7 +9,8 @@
#include <unistd.h> #include <unistd.h>
#ifdef CONFIG_OPENGL #ifdef CONFIG_OPENGL
#include <GL/glx.h> #include <GL/gl.h>
#include "backend/gl/glx.h"
#include "backend/gl/gl_common.h" #include "backend/gl/gl_common.h"
#endif #endif

View File

@ -11,7 +11,6 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <GL/glx.h>
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <xcb/render.h> #include <xcb/render.h>
#include <stdio.h> #include <stdio.h>

View File

@ -24,7 +24,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include <locale.h> #include <locale.h>
#include <GL/glx.h> #include <GL/gl.h>
bool bool
glx_dim_dst(session_t *ps, int dx, int dy, int width, int height, float z, glx_dim_dst(session_t *ps, int dx, int dy, int width, int height, float z,

View File

@ -13,7 +13,7 @@
#include "options.h" #include "options.h"
#ifdef CONFIG_OPENGL #ifdef CONFIG_OPENGL
#include <GL/glx.h> #include "backend/gl/glx.h"
#include "opengl.h" #include "opengl.h"
#endif #endif
@ -29,7 +29,6 @@
#include "x.h" #include "x.h"
#include "backend/backend_common.h" #include "backend/backend_common.h"
#include "backend/gl/glx.h"
#include "render.h" #include "render.h"
/** /**

View File

@ -6,7 +6,6 @@
#include <xcb/render.h> #include <xcb/render.h>
#include <stdbool.h> #include <stdbool.h>
#ifdef CONFIG_OPENGL #ifdef CONFIG_OPENGL
#include <GL/glx.h>
#include "backend/gl/glx.h" #include "backend/gl/glx.h"
#endif #endif
#include "region.h" #include "region.h"

View File

@ -3,8 +3,6 @@
/// Function pointers to init VSync modes. /// Function pointers to init VSync modes.
#include <GL/glx.h>
#include "common.h" #include "common.h"
#include "log.h" #include "log.h"

View File

@ -12,7 +12,6 @@
#include <xcb/damage.h> #include <xcb/damage.h>
#include <xcb/render.h> #include <xcb/render.h>
#include <pixman.h> #include <pixman.h>
#include <GL/glx.h>
#include "utils.h" #include "utils.h"
#include "region.h" #include "region.h"
@ -20,6 +19,7 @@
#include "common.h" #include "common.h"
#include "x.h" #include "x.h"
#include "log.h" #include "log.h"
#include "backend/gl/glx.h"
/** /**
* Get a specific attribute of a window. * Get a specific attribute of a window.