There is a seemingly unavoidable race condition when waiting for data on
the X11 display connection, as long as any other thread is also making
Xlib calls. The event data we are waiting for could be read by the
other thread as part of looking for the reply to its request, before our
poll has begun.
This commit replaces the X11 event sent by glfwPostEmptyEvent with
writing to an unnamed pipe. The race condition remains if other Xlib
calls are made on other threads, but glfwPostEmptyEvent should now be
race-free.
This commit is based on work by pcwalton, OlivierSohn, kovidgoyal and
joaodasilva.
Closes#2033
Related to #379
Related to #1281
Related to #1285
(cherry picked from commit cd22e2849512a88d0ab77bc7a3458646625f2c50)
specified "for linux or unix" and added a bit about using Visual Studio on Windows.
(cherry picked from commit 1a5e07fd4b0a5b6a70e99bbc52470962824d6979)
In the compile guide, the "Dependencies for Linux and OSMesa" section
looks to be one level too high in the hierarchy. I've moved it to be in
line with the similarly-named sub-sub-sections.
Closes#1923.
(cherry picked from commit 52d8347d34b51229cb6029a351ef19cfe60835ca)
Some URLs in the documentation were overlooked during the switch to
https: for the GLFW website. This updates those and a few third-party
URLs.
(cherry picked from commit 787295b3aff950abd45bee3495ac1200eb6bc5e1)
The `#glfw` IRC channel is moving to the Libera.Chat network due to the
recent takeover of the Freenode network.
(cherry picked from commit 78380c7761043b0e4ab1190e3cccbe4d94359aa6)
New code should use GL_KHR_debug instead but it's not as good an example
to use in this case as the symbols it adds has no suffixes.
(cherry picked from commit ec621a00bd96cbc41a7e1f630adf155ae2d08267)
This makes USE_MSVC_RUNTIME_LIBRARY_DLL update the directory scope
CMAKE_MSVC_RUNTIME_LIBRARY variable instead of CMAKE_C_FLAGS on CMake
3.15 and later.
Solution proposed by @moritz-h.
Fixes#1783.
Closes#1796.
(cherry picked from commit f4a73296049b432720c9b6c230e479f9b41d74d3)
Most of this file is indented with tabs but parts are indented with spaces.
Closes#1770.
(cherry picked from commit 58df92acad5ec924274b3c33d277279475a6a645)
On Windows 7, when GLFW framebuffer transparency and the DWM are enabled
but DWM transparency is disabled (i.e. when the Transparency setting is
disabled under Personalization > Color), the contents of the framebuffer
is combined with the last frame using additive blending instead of
replacing the previous contents.
This commit limits GLFW framebuffer transparency on Windows 7 to when
DWM transparency is enabled, removing the previous workaround of setting
a layered window color key that led to rendering artifacts.
Fixes#1512.
(cherry picked from commit 05dd2fa2986c37e7aee3cba917b1d02a3a189390)
Re-worded documentation for the `GLFW_OPENGL_DEBUG_CONTEXT` window hint
to avoid implying that it only applies to OpenGL contexts. Added a link
to the relevant Khronos extension description.
Closes#1720.
(cherry picked from commit 8a69a0d7e545a88de3dd88710e4a881932ca07ed)
The documentation claims that any extension loader library header
included before the GLFW one will prevent the inclusion of the
default OpenGL header. In reality this only worked if the loader
defined the canonical desktop OpenGL __gl_h_ inclusion guard and even
then relied on the OpenGL header to detect this.
This is the companion to 105cf32e0b05e207d4cd5efa462887569ca2116a, which
added the preprocessor logic to check for many known OpenGL and OpenGL
ES inclusion guards and not even attempt to include the default header
if any are present.
Some clarification of the language around header inclusion has also been
attempted, including making GLFW_INCLUDE_NONE more prominent.
Fixes#1695.
(cherry picked from commit 399c2a1fadbe6a1019c54f63d3839ef97a77d783)
This removes most references to GLU, replaces the legacy CMake cache
variables for OpenGL with the modern namespaced target and switches to
$() for command substitution.
Fixes#1580.
(cherry picked from commit d973acc123826666ecc9e6fd475682e3d84c54a6)
This adds optional support for the VK_EXT_metal_surface instance
extension.
Closes#1619.
(cherry picked from commit c5cb4a253a9c304b136cac01a378567dc46e0320)
This removes the final dependency on CoreVideo, using a display link to
get the refresh rate of monitors where Core Graphics report a refresh
rate of zero. Instead we now query the I/O registry directly, similarly
to what the display link does at creation.
Thanks to @OneSadCookie for pointers to this solution.
(cherry picked from commit 4ec7daf3e92440efab8dac7c1f4c60707d990ed0)
This is a temporary fix while we determine if the color key workaround
should be removed completely. See issue thread for discussion.
Related to #1512.
(cherry picked from commit c88ee1c9d3e018c199eaf0b0f5ccc3874ac1de09)
Most context related hint and attribute links had copypaste errors.
The GLFW_CONTEXT_RELEASE_BEHAVIOR and GLFW_CONTEXT_NO_ERROR attributes
did not have guide documentation.
(cherry picked from commit 3cf7645b96c593d74f089069ac2e1c67938efd7f)
This replaces the manual ad-hoc version variables we have used since
CMake 2.x (and GLFW 2.x lite).
(cherry picked from commit a255e7ace6a1bbdd879df11916b0273ac207cffb)