fix glad_glx on linux
This commit is contained in:
@@ -190,7 +190,7 @@ int gladLoadGLX(Display *dpy, int screen) {
|
|||||||
|
|
||||||
if(open_gl()) {
|
if(open_gl()) {
|
||||||
status = gladLoadGLXLoader((GLADloadproc)get_proc, dpy, screen);
|
status = gladLoadGLXLoader((GLADloadproc)get_proc, dpy, screen);
|
||||||
close_gl();
|
//close_gl();
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@@ -777,13 +777,6 @@ static int find_extensionsGLX(void) {
|
|||||||
|
|
||||||
static void find_coreGLX(Display *dpy, int screen) {
|
static void find_coreGLX(Display *dpy, int screen) {
|
||||||
int major = 0, minor = 0;
|
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);
|
glXQueryVersion(dpy, &major, &minor);
|
||||||
GLADGLXDisplay = dpy;
|
GLADGLXDisplay = dpy;
|
||||||
GLADGLXscreen = screen;
|
GLADGLXscreen = screen;
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -388,7 +388,8 @@ if _platform == "linux" or _platform == "linux2":
|
|||||||
CXX_FLAGS += '-fno-inline-functions-called-once'
|
CXX_FLAGS += '-fno-inline-functions-called-once'
|
||||||
sources = sources + ["examples/ThirdPartyLibs/enet/unix.c"]\
|
sources = sources + ["examples/ThirdPartyLibs/enet/unix.c"]\
|
||||||
+["examples/OpenGLWindow/X11OpenGLWindow.cpp"]\
|
+["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"]
|
include_dirs += ["examples/ThirdPartyLibs/optionalX11"]
|
||||||
elif _platform == "win32":
|
elif _platform == "win32":
|
||||||
print("win32!")
|
print("win32!")
|
||||||
|
|||||||
Reference in New Issue
Block a user