fix glad_glx on linux

This commit is contained in:
Erwin Coumans
2018-02-20 20:57:55 -08:00
parent 850b8b0493
commit d583269430
2 changed files with 3 additions and 9 deletions

View File

@@ -190,7 +190,7 @@ int gladLoadGLX(Display *dpy, int screen) {
if(open_gl()) {
status = gladLoadGLXLoader((GLADloadproc)get_proc, dpy, screen);
close_gl();
//close_gl();
}
return status;
@@ -777,13 +777,6 @@ static int find_extensionsGLX(void) {
static void find_coreGLX(Display *dpy, int screen) {
int major = 0, minor = 0;
if(dpy == 0 && GLADGLXDisplay == 0) {
dpy = XOpenDisplay(0);
screen = XScreenNumberOfScreen(XDefaultScreenOfDisplay(dpy));
} else if(dpy == 0) {
dpy = GLADGLXDisplay;
screen = GLADGLXscreen;
}
glXQueryVersion(dpy, &major, &minor);
GLADGLXDisplay = dpy;
GLADGLXscreen = screen;

View File

@@ -388,7 +388,8 @@ if _platform == "linux" or _platform == "linux2":
CXX_FLAGS += '-fno-inline-functions-called-once'
sources = sources + ["examples/ThirdPartyLibs/enet/unix.c"]\
+["examples/OpenGLWindow/X11OpenGLWindow.cpp"]\
+["examples/ThirdPartyLibs/glad/glad.c"]
+["examples/ThirdPartyLibs/glad/glad.c"]\
+["examples/ThirdPartyLibs/glad/glad_glx.c"]
include_dirs += ["examples/ThirdPartyLibs/optionalX11"]
elif _platform == "win32":
print("win32!")