By default, the glfw3native.h header will include the platform-specific
headers necessary for the return types of GLFW native access functions.
Sometimes it is preferrable to declare those types
This commit adds support for the GLFW_NATIVE_INCLUDE_NONE macro, which
when defined disables the inclusion of all platform-specific headers.
Fixes#1348
(cherry picked from commit 05f6c13d119ea2662c97527d2421fb4cffd3dbfc)
There were no checks for invalid values or asserts for all invalid NULL
pointers to glfwSetWindowIcon or glfwCreateCursor.
Fixes#1862
(cherry picked from commit 66a4882eb14344115e9cda9f8c0f0c5d0362ca6e)
On a Unix system, if you define GLFW_INCLUDE_NONE and
GLFW_EXPOSE_NATIVE_GLX, then include glfw3.h and glfw3native.h, you will
get a redefinition warning for GLAPIENTRY.
The glfw3.h header defines GLAPIENTRY as a service for OpenGL related
headers that assume it's already defined. However, glx.h includes gl.h,
which defines GLAPIENTRY unconditionally.
If not for Hyrum's law, the better solution would have been not to
define GLAPIENTRY if GLFW_INCLUDE_NONE is defined.
Fixes#2010
This is adapted to 3.3-stable from
535c3ce63240ee91f998219b35dc82abef545c3d and
ce85c7dcaf48be96870f2d8fec1d78b0b7d744c7.
The reference documentation for glfwGetGamepadName lacked the possible
errors section.
Closes#2007
(cherry picked from commit c19f36b28d255d280d39446f09f36f441318138e)
This docstring previously indicated that GLFW_CONTEXT_REVISION was
a window hint and attribute, but in fact it is only a window attribute
(there is no code which uses this constant in any other context.)
We noticed this in https://github.com/hexops/mach/pull/71/files#r749741814Closes#1992
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
(cherry picked from commit 37fc28bff6cad7164aa67e828e9317596f8080da)
Add GLFW_FORMAT_UNAVAILABLE to the list of possible errors in the
reference documentation for glfwGetClipboardString.
Slightly edited by @elmindreda.
Closes#1998
(cherry picked from commit bb193325cc4e5af7d4e715072a242c1d3cfce26e)
The GLFW_INCLUDE_GLCOREARB branch was left out when GLFW_INCLUDE_GLEXT
was originally added, for reasons that are lost to history. The current
versions of these headers seem to co-exist just fine.
Issue reported on IRC.
(cherry picked from commit 309d79376f31bddb75faed26efd1fe27b9365c06)
This sentence was truncated by 951a9583faf91bdbe96bacd5d24a8969c0cca418
and then not updated when content scale support was added with
16bf872117896fb88493403157fcd367303fd1f6.
(cherry picked from commit 6a200531026f383d7f5c260ae802c43be80c2cd7)
Started adding these because of Doxygen warnings but it should have been
done regardless.
(cherry picked from commit 4e557437f2e97945f57a86fc6a8c659bf5346098)
The two final sorting criteria were not included in the documentation.
Fixes#1889.
(cherry picked from commit 0e9ec7788b4985a0df698080258e4091d18dcc3b)
This fixes a regression introduced by
105cf32e0b05e207d4cd5efa462887569ca2116a where GLFW_INCLUDE_GLU had no
effect if the GLFW header detected an earlier OpenGL header or loader
library header.
Closes#1712.
(cherry picked from commit 81f475bccbc0e784e8327005f2e66e3546fe8da0)
It is safe to call glfwTerminate both before initialization and after
termination.
Closes#1698.
(cherry picked from commit 7486e12f88b2a9039b805356bcbe259c0fca5c2d)
If an OpenGL ES header or the glcorearb header is included before the
GLFW header (with no options defined), the legacy OpenGL header will be
implicitly included and the compilation will fail.
This disables the default behavior if we detect any known OpenGL, OpenGL
ES or extension loader inclusion guard macro.
Sources:
- Khronos headers
- Windows SDK
- MinGW
- MinGW-w64
- flextGL
- glad
- glad2
- GLEW
- Galogen
- gl3w
- GLXW
- glbinding
- Epoxy
- Glatter
- glLoadGen
- Regal
- GLee
- OpenGL.framework
- Debian
- FreeBSD
- ANGLE
- SwiftShader
Related to #1695.
(cherry picked from commit 105cf32e0b05e207d4cd5efa462887569ca2116a)
This adds optional support for the VK_EXT_metal_surface instance
extension.
Closes#1619.
(cherry picked from commit c5cb4a253a9c304b136cac01a378567dc46e0320)
This makes key names per-key static strings for all supported platforms.
Fixes#1200.
(cherry picked from commit 56ca0cb3b30ecb1310752360e9c875fc1b2bab5e)
When both GLFW_INCLUDE_VULKAN and VK_USE_PLATFORM_WIN32_KHR were
defined, the GLFW header would define replacement versions of APIENTRY
and WINGDIAPI /before/ including the Vulkan header, which would include
windows.h, which (justifiably) defines APIENTRY and WINGDIAPI blindly.
Fixes#1524.
(cherry picked from commit 773f4495f005004ea17fbc4a96b6b1ce758e79d6)
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)