mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Added support for GLX_MESA_swap_interval.
This commit is contained in:
parent
34c93a5124
commit
aa328c0bbd
|
@ -335,7 +335,7 @@ version of GLFW.</p>
|
|||
<li>[Cocoa] Bugfix: The cursor position incorrectly rounded during conversion</li>
|
||||
<li>[Cocoa] Bugfix: Cursor positioning led to nonsensical results for fullscreen windows</li>
|
||||
<li>[Cocoa] Bugfix: The GLFW window was flagged as restorable</li>
|
||||
<li>[X11] Added support for the <code>GLX_EXT_swap_control</code> extension as an alternative to <code>GLX_SGI_swap_control</code></li>
|
||||
<li>[X11] Added support for the <code>GLX_EXT_swap_control</code> and <code>GLX_MESA_swap_control</code> extensions as alternatives to <code>GLX_SGI_swap_control</code></li>
|
||||
<li>[X11] Added the POSIX <code>CLOCK_MONOTONIC</code> time source as the preferred method</li>
|
||||
<li>[X11] Added dependency on libm, where present</li>
|
||||
<li>[X11] Added support for the <code>_NET_WM_NAME</code> and <code>_NET_WM_ICON_NAME</code> EWMH window properties</li>
|
||||
|
|
|
@ -544,6 +544,15 @@ int _glfwInitOpenGL(void)
|
|||
_glfwLibrary.GLX.SGI_swap_control = GL_TRUE;
|
||||
}
|
||||
|
||||
if (_glfwPlatformExtensionSupported("GLX_MESA_swap_control"))
|
||||
{
|
||||
window->GLX.SwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)
|
||||
_glfwPlatformGetProcAddress("glXSwapIntervalMESA");
|
||||
|
||||
if (window->GLX.SwapIntervalMESA)
|
||||
window->GLX.MESA_swap_control = GL_TRUE;
|
||||
}
|
||||
|
||||
if (_glfwPlatformExtensionSupported("GLX_SGIX_fbconfig"))
|
||||
{
|
||||
_glfwLibrary.GLX.GetFBConfigAttribSGIX = (PFNGLXGETFBCONFIGATTRIBSGIXPROC)
|
||||
|
@ -722,8 +731,13 @@ void _glfwPlatformSwapInterval(int interval)
|
|||
window->X11.handle,
|
||||
interval);
|
||||
}
|
||||
else if (_glfwLibrary.GLX.SGI_swap_control)
|
||||
_glfwLibrary.GLX.SwapIntervalSGI(interval);
|
||||
else if (window->GLX.MESA_swap_control)
|
||||
window->GLX.SwapIntervalMESA(interval);
|
||||
else if (window->GLX.SGI_swap_control)
|
||||
{
|
||||
if (interval > 0)
|
||||
window->GLX.SwapIntervalSGI(interval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -97,6 +97,10 @@
|
|||
#define _GLFW_CONVERSION_SUCCEEDED 1
|
||||
#define _GLFW_CONVERSION_FAILED 2
|
||||
|
||||
#ifndef GLX_MESA_swap_control
|
||||
typedef int (*PFNGLXSWAPINTERVALMESAPROC)(int);
|
||||
#endif
|
||||
|
||||
|
||||
//========================================================================
|
||||
// GLFW platform specific types
|
||||
|
@ -242,6 +246,7 @@ typedef struct _GLFWlibraryGLX
|
|||
// GLX extensions
|
||||
PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI;
|
||||
PFNGLXSWAPINTERVALEXTPROC SwapIntervalEXT;
|
||||
PFNGLXSWAPINTERVALMESAPROC SwapIntervalMESA;
|
||||
PFNGLXGETFBCONFIGATTRIBSGIXPROC GetFBConfigAttribSGIX;
|
||||
PFNGLXCHOOSEFBCONFIGSGIXPROC ChooseFBConfigSGIX;
|
||||
PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC CreateContextWithConfigSGIX;
|
||||
|
@ -250,6 +255,7 @@ typedef struct _GLFWlibraryGLX
|
|||
GLboolean SGIX_fbconfig;
|
||||
GLboolean SGI_swap_control;
|
||||
GLboolean EXT_swap_control;
|
||||
GLboolean MESA_swap_control;
|
||||
GLboolean ARB_multisample;
|
||||
GLboolean ARB_create_context;
|
||||
GLboolean ARB_create_context_profile;
|
||||
|
|
Loading…
Reference in New Issue
Block a user