mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Merge branch 'master' into multi-monitor
This commit is contained in:
commit
f559b217af
@ -11,7 +11,7 @@ To use these files you add a special parameter when configuring the source tree:
|
||||
|
||||
For example, to use the Debian GNU/Linux MinGW package, run CMake like this:
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=CMake/linux-i586-mingw32msvc.cmake .
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=CMake/i586-mingw32msvc.cmake .
|
||||
|
||||
For more details see this article:
|
||||
|
||||
|
@ -54,6 +54,21 @@ if (_GLFW_WIN32_WGL)
|
||||
list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
|
||||
list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||
|
||||
if (MSVC)
|
||||
option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON)
|
||||
|
||||
if (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
|
||||
foreach (flag CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
if (${flag} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
|
||||
endif()
|
||||
if (${flag} MATCHES "/MDd")
|
||||
string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(_GLFW_NO_DLOAD_WINMM ${BUILD_SHARED_LIBS})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
@ -178,7 +193,7 @@ if (_GLFW_COCOA_NSGL)
|
||||
set(CMAKE_OSX_ARCHITECTURES ppc;i386;ppc64;x86_64)
|
||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
|
||||
set(CMAKE_C_FLAGS "-mmacosx-version-min=10.5")
|
||||
else(GLFW_BUILD_UNIVERSAL)
|
||||
else()
|
||||
message(STATUS "Building GLFW only for the native architecture")
|
||||
endif()
|
||||
|
||||
|
@ -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"))
|
||||
{
|
||||
_glfwLibrary.GLX.SwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)
|
||||
_glfwPlatformGetProcAddress("glXSwapIntervalMESA");
|
||||
|
||||
if (_glfwLibrary.GLX.SwapIntervalMESA)
|
||||
_glfwLibrary.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.MESA_swap_control)
|
||||
_glfwLibrary.GLX.SwapIntervalMESA(interval);
|
||||
else if (_glfwLibrary.GLX.SGI_swap_control)
|
||||
{
|
||||
if (interval > 0)
|
||||
_glfwLibrary.GLX.SwapIntervalSGI(interval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,6 +100,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
|
||||
@ -245,6 +249,7 @@ typedef struct _GLFWlibraryGLX
|
||||
// GLX extensions
|
||||
PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI;
|
||||
PFNGLXSWAPINTERVALEXTPROC SwapIntervalEXT;
|
||||
PFNGLXSWAPINTERVALMESAPROC SwapIntervalMESA;
|
||||
PFNGLXGETFBCONFIGATTRIBSGIXPROC GetFBConfigAttribSGIX;
|
||||
PFNGLXCHOOSEFBCONFIGSGIXPROC ChooseFBConfigSGIX;
|
||||
PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC CreateContextWithConfigSGIX;
|
||||
@ -253,6 +258,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