Commit Graph

539 Commits

Author SHA1 Message Date
Camilla Löwy
0a9488e3f0 Remove configuration header 2021-10-12 12:54:35 +02:00
Camilla Löwy
0391b7b277 Remove Doxyfile tags deprecated by Doxygen 1.9.2 2021-10-12 12:54:35 +02:00
Camilla Löwy
63da04e5ce Add HTML header and footer to docs dependencies
This should have been included in
150744ecca.
2021-08-26 17:49:54 +02:00
Camilla Löwy
150744ecca Only rebuild documentation when necessary
This teaches CMake about the dependencies of the Doxygen generated
documentation so it isn't rebuilt every time.
2021-08-26 16:03:58 +02:00
Camilla Löwy
8c8def5de5 Start making use of CMake 3.4 string(APPEND) 2021-08-26 16:03:58 +02:00
Camilla Löwy
22b586b3d8 Add pluggable heap allocator
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.
2021-08-25 21:00:10 +02:00
Camilla Löwy
d83849792b Add override variable for CMake library type
This adds the GLFW_LIBRARY_TYPE CMake cache variable, which allows users
and higher-level projects to set what type of library GLFW is built as.

When not empty, this value overrides the standard BUILD_SHARED_LIBS
option for GLFW while still allowing it to control the type of other
libraries in a larger project.

This also allows building GLFW as an object library without adding dummy
source files (as required by Xcode) or producing unused library
binaries.

Projects using CMake 3.12 or later can link the resulting GLFW object
library normally using target_link_libraries.

Fixes #279.
Related to #1307.
Closes #1497.
Closes #1574.
Closes #1928.
2021-08-15 22:44:43 +02:00
Camilla Löwy
01778329ec Add custom target for updating gamepad mappings 2021-08-01 20:16:17 +02:00
Camilla Löwy
3dc7349c35 Expand list of distro derivatives slightly 2021-07-29 21:50:24 +02:00
Camilla Löwy
9e1ee3f263 Add Fedora package names to compilation guide 2021-07-29 21:50:24 +02:00
Camilla Löwy
3b95970482 Improve library compilation guide somewhat
Related to #1931.
2021-07-16 19:36:10 +02:00
David V. McKay
1a5e07fd4b
realizing "as you would" is platform dependent
specified "for linux or unix" and added a bit about using Visual Studio on Windows.
2021-07-07 23:44:22 -04:00
David V. McKay
f010d8b77d
Clarify "as you would" for beginners.
fixes #1088
2021-07-07 23:25:35 -04:00
A. Tombs
52d8347d34 Consistent subsections in compile guide
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.
2021-06-23 21:30:07 +02:00
Camilla Löwy
787295b3af Fix some documentation URLs still using http:
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.
2021-06-14 19:50:32 +02:00
Camilla Löwy
78380c7761 Update IRC network to Libera.Chat
The `#glfw` IRC channel is moving to the Libera.Chat network due to the
recent takeover of the Freenode network.
2021-06-14 19:50:32 +02:00
Camilla Löwy
04f21abb52 Make GLFW_DOUBLEBUFFER a window attribute 2021-05-14 19:02:25 +02:00
Camilla Löwy
a39115a27b Remove claim that EGL is not supported on macOS 2021-05-13 15:03:49 +02:00
Camilla Löwy
bbbbd3e870 Clarify documentation for hints 2021-05-13 15:03:19 +02:00
Camilla Löwy
ec621a00bd Replace GL_ARB_debug_output in context guide
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.
2021-04-22 22:37:37 +02:00
Camilla Löwy
a25e8eb50d Add docs for GLFW_X11_XCB_VULKAN_SURFACE
Related to #1793.
2021-04-22 22:33:07 +02:00
Camilla Löwy
f4a7329604 Update USE_MSVC_RUNTIME_LIBRARY_DLL for CMake 3.15
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.
2021-04-14 22:50:32 +02:00
Camilla Löwy
291f6dc32c Remove deprecated Doxygen tag
Fixes #1867.
2021-03-19 14:24:50 +01:00
Bhee
0b9e48fa3d Fix minor typo: If if -> If. 2020-12-14 12:27:57 +01:00
Emmanuel Gil Peyrot
40d150c399 Docs: Remove mentions of extra-cmake-modules 2020-09-30 17:04:20 +02:00
Camilla Löwy
73ef5f0abb Update CODEOWNERS for move to SCSS 2020-09-22 19:50:40 +02:00
Luflosi
58df92acad
Use consistent indentation for Doxygen custom stylesheet
Most of this file is indented with tabs but parts are indented with spaces.

Closes #1770.
2020-09-18 14:27:57 +02:00
Siavash Eliasi
96f9f5c4b9 Migrate to Sass for Doxygen custom stylesheets
Closes #1759.
2020-09-07 20:50:57 +02:00
Siavash Eliasi
bb1d917c2f Improve docs scaling on mobile and small screens
Closes #1757.
2020-09-02 21:50:57 +02:00
Camilla Löwy
59196f9ad8 Make old debug context hint/attrib name searchable 2020-09-02 21:27:43 +02:00
Camilla Löwy
b9dfce0070 Fix formatting in transition guide 2020-09-02 17:41:38 +02:00
Camilla Löwy
05dd2fa298 Win32: Disable fb transparency when it is broken
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.
2020-07-29 15:21:45 +02:00
Camilla Löwy
e0f7ce402b Documentation fix
"Joystick token" is not used anywhere else in the documentation.
2020-07-21 18:06:13 +02:00
Camilla Löwy
782e6b6cef Make joystick platform code init on demand
This makes joystick support initialize the first time a joystick
function is called, including those gamepad functions that are layered
on top of joystick functions.

Related to #1284.
Related to #1646.
2020-07-21 17:38:56 +02:00
Camilla Löwy
3207fc7120 Add window property test 2020-07-15 19:08:04 +02:00
Camilla Löwy
a122d91303 Documentation work for GLFW_MOUSE_PASSTHROUGH
Related to #1568.
2020-07-15 18:02:38 +02:00
Camilla Löwy
f5f060e6bf Init hint documentation work
The documentation for window hints had several features that had not
been carried over to init hints.

This also removes listing glfwInitHint for each hint, which was an
artifact of the removal of glfwInitHintString.
2020-06-29 00:02:41 +02:00
Camilla Löwy
0dea8a4441 EGL: Add support for EGL_ANGLE_platform_angle
This adds basic support for selecting the platform type (rendering
backend) when running on ANGLE.

Related to #1380.
2020-06-29 00:02:22 +02:00
Camilla Löwy
36f8250321 Add missing entries to new symbols list
Related to #1692.
2020-06-28 19:27:49 +02:00
Camilla Löwy
b420ca7404 Add GLFW_CONTEXT_DEBUG window hint alias
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.
2020-06-28 19:27:48 +02:00
Camilla Löwy
4e3b43383a Re-word docs for GLFW_OPENGL_DEBUG_CONTEXT attrib
Related to #1720.
2020-06-28 19:25:28 +02:00
A. Tombs
8a69a0d7e5 Re-word docs for OPENGL_DEBUG_CONTEXT hint
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.
2020-06-26 17:48:46 +02:00
Camilla Löwy
69ff0b8ee0 Refresh Doxygen file with version 1.8.18 2020-06-05 19:11:04 +02:00
Camilla Löwy
399c2a1fad Clarify docs on default GL header inclusion
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 105cf32e0b, 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.
2020-06-02 18:04:49 +02:00
Camilla Löwy
fbf8aae44f Fix typo in header option macro docs 2020-05-31 15:28:57 +02:00
Camilla Löwy
27295b508f Note removal of wl_shell support in release notes 2020-05-19 18:56:25 +02:00
Camilla Löwy
d7ae90a790 Update community resource links 2020-05-05 00:38:14 +02:00
Camilla Löwy
41a19ed49c Disambiguate Vulkan support reference link 2020-05-05 00:38:14 +02:00
Camilla Löwy
9516df52a4 Fix unclear language in build guide
Fixes #1658.
2020-03-12 01:57:58 +01:00
Camilla Löwy
72366ac9a9 Cocoa: Finish launching NSApp in glfwInit
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.
2020-03-12 01:56:35 +01:00
Camilla Löwy
d1ae7bac60 Put docs target in GLFW3 folder 2020-02-10 17:44:34 +01:00
Emmanuel Gil Peyrot
76406c7894 Mention that xdg-shell is mandatory on Wayland 2020-02-06 09:02:16 +01:00
Camilla Löwy
d973acc123 Update OpenGL bits of build documentation slightly
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.
2020-01-19 23:35:59 +01:00
ByunghoonKim
c5cb4a253a Cocoa: Add support for VK_EXT_metal_surface
This adds optional support for the VK_EXT_metal_surface instance
extension.

Closes #1619.
2020-01-16 05:28:24 +01:00
Camilla Löwy
4ec7daf3e9 Cocoa: Replace display link with IOKit query
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.
2019-12-25 21:53:04 +01:00
Camilla Löwy
7dbdd2e6a5 Add more standard cursors
This adds the standard cursors for diagonal and omnidirectional
resize/move and operation-not-allowed.  It also adds new (better?) names
for the horizontal and vertical resize/move and pointing hand cursors.

References:
 - https://developer.apple.com/documentation/appkit/nscursor
 - https://stackoverflow.com/questions/10733228/
 - https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setsystemcursor
 - https://freedesktop.org/wiki/Specifications/cursor-spec/
 - https://tronche.com/gui/x/xlib/appendix/b/

Related to #427.
2019-11-28 22:24:00 +01:00
Camilla Löwy
50a6270e55 Add initial CODEOWNERS file 2019-11-14 19:50:14 +01:00
Camilla Löwy
b804379463 Add initial GH support file 2019-11-14 19:50:14 +01:00
Camilla Löwy
8e288dc94c Win32: Add GLFW_WIN32_KEYBOARD_MENU
This platform specific window hint enables access to the Windows window
menu via the keyboard shortcuts.
2019-11-11 22:37:18 +01:00
Camilla Löwy
c88ee1c9d3 Win32: Change transparent framebuffer key color
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.
2019-11-11 22:37:13 +01:00
Camilla Löwy
28d8507700 Fix order of words in window guide
Fixes #1571.
2019-11-01 13:43:47 +01:00
Camilla Löwy
82978bb3af Documentation work
This is the documentation update for the change introduced with
0b01d850ed, removing the requirement for
the forward-compatibility flag on macOS.
2019-10-29 12:04:22 +01:00
Camilla Löwy
376897a344 Replace notes for previous releases with links
The news / release notes page was getting a bit long.
2019-10-28 20:02:12 +01:00
Camilla Löwy
1e20218b3d Use HTTPS for Discourse forum 2019-10-16 02:33:12 +02:00
luz.paz
7105ff2dfd Fix typos
Found via `codespell -q 3 -S ./deps -L fo,numer,te,uint,wille`
2019-09-16 12:30:25 +02:00
Camilla Löwy
aa8e8ab960 Remove deprecated tags from Doxyfile.in
This fixes warnings emitted by Doxygen 1.8.16.
2019-09-06 15:55:59 +02:00
Camilla Löwy
51bb76c7c3 Improve (?) reference documentation for callbacks 2019-05-24 14:58:54 +02:00
Camilla Löwy
e1d9e2ba73 Clarify Doxyfile INPUT value generation 2019-05-24 14:43:49 +02:00
Camilla Löwy
bb6945a18a Clarify difference between time and timer in docs 2019-05-24 14:43:49 +02:00
Camilla Löwy
feaa532886 Add missing word 2019-05-24 14:43:49 +02:00
Camilla Löwy
3cf7645b96 Documentation work
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.
2019-05-24 14:43:49 +02:00
Camilla Löwy
e4aba7feaa Convert triangle-opengl example to 3.3 core 2019-05-24 14:43:49 +02:00
Camilla Löwy
a639d6e635 Rename OpenGL triangle example to triangle-opengl 2019-05-24 14:43:39 +02:00
Camilla Löwy
8ee589e43b Disable examples and tests when a subproject
This changes the default value of the GLFW_BUILD_EXAMPLES and
GLFW_BUILD_TESTS CMake options to false when GLFW is being added as
a subdirectory by another CMake project.

If you want the previous behavior, force these options to true before
adding the GLFW subdirectory:

set(GLFW_BUILD_EXAMPLES ON CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS ON CACHE BOOL "" FORCE)
add_subdirectory(path/to/glfw)

Doing this is backward compatible with earlier versions of GLFW.

The GLFW_BUILD_DOCS option is left enabled as it also requires Doxygen
to have any effect, is quicker to build and is more likely to be useful
when GLFW is a subproject.
2019-05-17 16:12:52 +02:00
Camilla Löwy
a255e7ace6 Move to the modern CMake project version option
This replaces the manual ad-hoc version variables we have used since
CMake 2.x (and GLFW 2.x lite).
2019-05-17 16:12:52 +02:00
Camilla Löwy
be71147ad5 Documentation work
The monitor content scale was missing from the monitor properties
paragraph.
2019-05-17 16:12:52 +02:00
Emmanuel Gil Peyrot
599fb3de34 Wayland: Remove wl_shell support
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.
2019-04-20 10:05:15 +02:00
Camilla Löwy
a337c56848 Start 3.4 2019-04-16 23:08:39 +02:00
Camilla Löwy
f4f1002d14 Documentation work 2019-04-15 02:46:07 +02:00
Camilla Löwy
d7e30b1c74 Replace glad and the Vulkan SDK with glad2
This removes all dependencies from the GLFW test programs on the Vulkan
SDK.

It also removes support for linking the GLFW shared library (dynamic
library, DLL) against the Vulkan loader static library.
2019-04-15 02:45:48 +02:00
Camilla Löwy
0fa77ea63a Documentation work 2019-04-08 20:51:34 +02:00
Camilla Löwy
0267cebe00 Update for Doxygen CSS changes 2019-04-05 14:25:28 +02:00
r00ster
f8a70aca67 Add an n
Closes #1460.
2019-04-05 05:18:39 +02:00
Camilla Löwy
422bf79e8f Documentation work 2019-04-05 03:26:52 +02:00
Camilla Löwy
5644b66bac Documentation work 2019-04-01 19:57:54 +02:00
Camilla Löwy
c0a3a9aefe Sort release notes by seemingly arbitrary criteria 2019-03-29 00:47:04 +01:00
Camilla Löwy
a43d1a4937 Documentation work
Fixes #920.
Related to #1322.
2019-03-05 16:59:46 +01:00
Camilla Löwy
1155c83013 Rename raw input to raw mouse motion, cleanup
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.
2019-02-22 13:04:11 +01:00
Emmanuel Gil Peyrot
bcd8f9aff2 Documentation work
Describe #1341.
2019-02-15 19:02:33 +01:00
Camilla Löwy
d5ab3e919a Cleanup
Replace client area with content area.
2019-01-25 12:46:46 +01:00
Camilla Löwy
55b1a16f90 Remove window requirement for all event functions
This lets an application wait for non-window events without needing to
create a window.

Fixes #1317.
2019-01-15 19:28:17 +01:00
Rolf Eike Beer
f9923e9095 Use GNUInstallDirs for install destinations
This has the advantage that the user may override e.g. the include
location, and the correct libdir (lib, lib64, lib/something) is
automatically determined.

Closes #1367.
2018-12-03 19:28:31 +01:00
Camilla Löwy
9bfdd218fb Fix Markdown table heads 2018-11-11 18:49:47 +01:00
Camilla Löwy
a9892acb94 Add tutorial to Doxygen menu 2018-11-05 19:04:27 +01:00
Camilla Löwy
fb01b16b94 Use Doxygen layout file 2018-11-05 19:04:27 +01:00
Camilla Löwy
bc5a24fee6 Fix newlines in Doxygen aliases 2018-11-05 19:04:27 +01:00
Camilla Löwy
53c8c72c67 Fix CSS for Doxygen Markdown tables
Doxygen changed the CSS classes for table-related elements.
2018-11-04 23:23:55 +01:00
Camilla Löwy
9bb50db6dd Use HTTPS when possible 2018-11-04 21:52:33 +01:00
MrVallentin
da8f3bc174 Updated URLs 2018-11-03 11:57:47 +01:00
MrVallentin
85fd5aa6c4 Use HTTPS when possible 2018-11-03 11:57:47 +01:00