This adds the glfwInitAllocator function for specifying a custom memory
allocator to use instead of the C runtime library.
The allocator is a struct of type GLFWallocator with fields
corresponding to malloc, realloc and free, while the internal API
corresponds to calloc, realloc and free.
Heap allocation calls are filtered before reaching the user-provided
functions, so deallocation of NULL and allocations of zero bytes are not
passed on, reallocating NULL is transformed into an allocation and
reallocating to size zero is transformed into deallocation.
The clearing of a new block to zero is performed by the internal
calloc-like function.
Closes#544.
Fixes#1628.
Closes#1947.
This adds the GLFW_MOUSE_PASSTHROUGH window hint and attribute for
controlling whether mouse input passes through the window to whatever
window is behind it.
Fixes#1236.
Closes#1568.
This adds GLFW_CONTEXT_DEBUG as a preferred alias for
the GLFW_OPENGL_DEBUG_CONTEXT window hint, as debug contexts are
defined for both OpenGL and OpenGL ES.
Related to #1720.
This fixes a regression introduced by
105cf32e0b where GLFW_INCLUDE_GLU had no
effect if the GLFW header detected an earlier OpenGL header or loader
library header.
Closes#1712.
This adds two new error codes: GLFW_FEATURE_UNAVAILABLE for when
a GLFW feature cannot be reasonably implemented on that platform, and
GLFW_FEATURE_UNIMPLEMENTED for when it can be but has not been yet.
This replaces the current situation where the Wayland code emitted
GLFW_PLATFORM_ERROR in both cases while the macOS code silently did
nothing.
If your application exits on any GLFW error, these error codes should at
least be easy to filter out from that behavior.
Ideally, GLFW_FEATURE_UNAVAILABLE should be rare and
GLFW_FEATURE_UNIMPLEMENTED should never be emitted at all.
Fixes#1692.
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.
This moves the remaining bits of NSApplication initialization into
_glfwPlatformInit. As a side-effect of this, any command-line program
initializing GLFW will get a menu bar, which is not ideal.
If this has happened to you and a bisect led you here, please see the
GLFW_COCOA_MENUBAR init hint introduced in GLFW 3.3.
If this patch is a terrible idea, please get in touch in the 3.4 release
timeframe.
This is a replacement for 6e6805000a,
which attempts to preserve the existing menu bar creation behavior for
the 3.3-stable branch.
Fixes#1649.
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.
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.
This protocol is part of the core Wayland, but it is pretty badly
designed and is missing quite a few features, and is in the process of
being phased out in compositors. Its support in GLFW requires
duplicating pretty much every single window management codepath.
This bumps the required compositor versions to the ones which have
implemented xdg-shell, approximately two years ago, which seems sensible
to me.
This renames 'raw input' to 'raw mouse motion' as there are other kinds
of raw input. The update path is restructured to avoid reinitializing
all of disabled cursor mode. Modification of shared state is moved out
into shared code. Raw mouse motion is disabled by default for
compatibility.
Related to #1401.