wrap GL/glx.h with undef None, use 0 instead, h/t @jfirebaugh
This commit is contained in:
2
common/glx.h
Normal file
2
common/glx.h
Normal file
@@ -0,0 +1,2 @@
|
||||
#include <GL/glx.h>
|
||||
#undef None
|
||||
@@ -39,7 +39,7 @@ HeadlessDisplay::HeadlessDisplay() {
|
||||
GLX_ALPHA_SIZE, 8,
|
||||
GLX_DEPTH_SIZE, 24,
|
||||
GLX_STENCIL_SIZE, 8,
|
||||
None
|
||||
0
|
||||
};
|
||||
|
||||
x_info = glXChooseVisual(x_display, DefaultScreen(x_display), pixelFormat);
|
||||
|
||||
@@ -171,7 +171,7 @@ void HeadlessView::make_inactive() {
|
||||
#endif
|
||||
|
||||
#if MBGL_USE_GLX
|
||||
if (!glXMakeCurrent(x_display, None, NULL)) {
|
||||
if (!glXMakeCurrent(x_display, 0, NULL)) {
|
||||
fprintf(stderr, "Removing OpenGL context failed\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#ifdef __APPLE__
|
||||
#define MBGL_USE_CGL 1
|
||||
#else
|
||||
#include <GL/glx.h>
|
||||
#include "glx.h"
|
||||
#define MBGL_USE_GLX 1
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user