projects
/
demo_prior
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f33f4d
)
fixed incorrect checking of the existence of GLX_EXT_swap_control and friends
master
author
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 12 Dec 2020 22:40:21 +0000
(
00:40
+0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 12 Dec 2020 22:40:21 +0000
(
00:40
+0200)
src/opengl.c
patch
|
blob
|
history
diff --git
a/src/opengl.c
b/src/opengl.c
index
2d5e6a4
..
8b5af75
100644
(file)
--- a/
src/opengl.c
+++ b/
src/opengl.c
@@
-16,9
+16,14
@@
int init_opengl(void)
glewInit();
#ifdef __unix__
glewInit();
#ifdef __unix__
+ glxewInit();
dpy = glXGetCurrentDisplay();
win = glXGetCurrentDrawable();
#endif
dpy = glXGetCurrentDisplay();
win = glXGetCurrentDrawable();
#endif
+#ifdef _WIN32
+ wglewInit();
+}
+#endif
return 0;
}
return 0;
}
@@
-26,14
+31,14
@@
int init_opengl(void)
void gl_swap_interval(int val)
{
#ifdef __unix__
void gl_swap_interval(int val)
{
#ifdef __unix__
- if(GLX_EXT_swap_control) {
+ if(GLXEW_EXT_swap_control) {
glXSwapIntervalEXT(dpy, win, val);
glXSwapIntervalEXT(dpy, win, val);
- } else if(GLX_SGI_swap_control) {
+ } else if(GLXEW_SGI_swap_control) {
glXSwapIntervalSGI(val);
}
#endif
#ifdef _WIN32
glXSwapIntervalSGI(val);
}
#endif
#ifdef _WIN32
- if(WGL_EXT_swap_control) {
+ if(WGLEW_EXT_swap_control) {
wglSwapIntervalEXT(val);
}
#endif
wglSwapIntervalEXT(val);
}
#endif