Changed: #1145 Implement VSync under Linux
This commit is contained in:
parent
6edf49e2b6
commit
7d1b8eae21
3 changed files with 24 additions and 3 deletions
|
@ -445,7 +445,7 @@ PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB;
|
|||
#elif defined(NL_OS_UNIX)
|
||||
|
||||
// Swap control extensions
|
||||
PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT;
|
||||
NEL_PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT;
|
||||
|
||||
PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI;
|
||||
|
||||
|
@ -1429,7 +1429,7 @@ static bool setupGLXEXTSwapControl(const char *glext)
|
|||
CHECK_EXT("GLX_EXT_swap_control");
|
||||
|
||||
#if defined(NL_OS_UNIX) && !defined(NL_OS_MAC)
|
||||
CHECK_ADDRESS(PFNGLXSWAPINTERVALEXTPROC, glXSwapIntervalEXT);
|
||||
CHECK_ADDRESS(NEL_PFNGLXSWAPINTERVALEXTPROC, glXSwapIntervalEXT);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
|
|
@ -698,7 +698,7 @@ extern PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB;
|
|||
|
||||
// Swap control extensions
|
||||
//===========================
|
||||
extern PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT;
|
||||
extern NEL_PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT;
|
||||
|
||||
extern PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI;
|
||||
|
||||
|
|
|
@ -376,6 +376,27 @@ typedef GLvoid (APIENTRY * NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, G
|
|||
typedef GLvoid (APIENTRY * NEL_PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
|
||||
#endif
|
||||
|
||||
#if defined(NL_OS_MAC)
|
||||
|
||||
// Mac GL extensions
|
||||
|
||||
#elif defined(NL_OS_UNIX)
|
||||
|
||||
// GLX extensions
|
||||
#ifndef NL_GLX_EXT_swap_control
|
||||
#define NL_GLX_EXT_swap_control 1
|
||||
|
||||
#ifndef GLX_EXT_swap_control
|
||||
#define GLX_SWAP_INTERVAL_EXT 0x20F1
|
||||
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
|
||||
#endif
|
||||
|
||||
typedef GLint (APIENTRY * NEL_PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, GLint interval);
|
||||
|
||||
#endif // NL_GLX_EXT_swap_control
|
||||
|
||||
#endif // NL_OS_MAC
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue