Commit Graph

619 Commits

Author SHA1 Message Date
Camilla Löwy
c016b26852 Remove non-GUI binaries from GUI-only setup 2019-12-09 23:48:26 +01:00
Camilla Löwy
2fb336268f Shorten name of Info.plist template file
Our template file is not simply a copy of the file included in CMake and
so should not be named as if it was.
2019-12-09 23:35:50 +01:00
Camilla Löwy
ce9d124243 Remove command-line options from GUI-only test 2019-12-09 23:35:50 +01:00
Camilla Löwy
d74c18117d Remove dependency on platform header paths
The tests and examples should not need these paths.
2019-12-09 23:33:37 +01:00
Camilla Löwy
92c70b2a83 Rename CMake variable for GUI-only programs
Hopefully this is less ambiguous.
2019-12-09 23:33:37 +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
953a1c3f8b Cleanup 2019-11-11 22:37:18 +01:00
Guillaume Racicot
bc5523e994 Set C standard at 99 for all test targets
Related to #1593.
2019-11-11 22:37:18 +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
de23429455 Add reminder for why events test is not closing 2019-11-11 22:37:18 +01:00
Camilla Löwy
08f01c31a0 Add gamepad information to events test output 2019-11-11 22:37:18 +01:00
Camilla Löwy
20e522cdf4 Make events test output only UTF-8 in C locale 2019-11-11 22:37:18 +01:00
Camilla Löwy
f71b55f83d Clean up monitors tool output 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
efda4afb49 Put fix in correct position
This fixes a mismerge by @elmindreda in
65748fb8f3.
2019-07-25 20:32:51 +02:00
Camilla Löwy
65748fb8f3 Fix Vulkan triangle test segfault on resize
The command buffer handle was not reset after being freed on window
resize, leading to a segfault when the stale handle was used.
2019-07-25 19:56:03 +02:00
Camilla Löwy
6abad2efd2 Fix conflict with DEBUG macro defined by Bazel
The Bazel build system may define DEBUG when compiling on macOS, which
caused the glfwinfo test program to fail to build.

Fixes #1537.
2019-07-24 21:29:46 +02:00
Camilla Löwy
3a5e99e59a Remove unused function in tearing test 2019-06-27 20:07:19 +02:00
Camilla Löwy
d834f01ca4 Rename legacy Vulkan triangle program
Fixes #1477.
2019-05-24 17:28:32 +02:00
Camilla Löwy
537ea4ccf1 Explicitly disable inclusion for test and examples
Thank you, Travis CI, for reminding me that one cannot disable a header
with inclusion guards if it doesn't exist.
2019-05-24 17:28:32 +02:00
Camilla Löwy
51bb76c7c3 Improve (?) reference documentation for callbacks 2019-05-24 14:58:54 +02:00
Camilla Löwy
c415c71947 Clean up glfwinfo Vulkan version output 2019-05-19 21:10:29 +02:00
Camilla Löwy
144c98bcb3 Simplify glfwinfo Vulkan enumerations 2019-05-19 21:10:29 +02:00
Camilla Löwy
fa025d8f80 Convert glfwinfo to C99 2019-05-19 21:10:29 +02:00
Camilla Löwy
700d1f28d8 Add Vulkan 1.1 support to glfwinfo 2019-05-19 21:10:29 +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
d0b7f539e2 Add full screen toggling to cursor test 2019-04-15 14:52:17 +02:00
Camilla Löwy
62d296992e Add min/max corner placement to cursor test
Related to #1461.
2019-04-15 14:52:17 +02:00
Camilla Löwy
5f4e66b21a Add cursor position rountrip key to cursor test
Related to #1461.
2019-04-15 14:52:17 +02:00
Camilla Löwy
f03614277d Update cursor test tracking when enabling cursor
Related to #1461.
2019-04-15 14:52:17 +02:00
Camilla Löwy
45a62adf82 Fix cursor test tracking mode drawing
Related to #1461.
2019-04-15 14:37:03 +02:00
Camilla Löwy
718609275d Add custom cursor to cursor test tracking mode
Related to #1461.
2019-04-15 14:36:12 +02:00
Camilla Löwy
224e9205e0 Remove command-line options from tearing test 2019-04-15 14:35:11 +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
8d4fd40b64 Formatting 2019-03-28 23:07:30 +01:00
Camilla Löwy
9e54b97cfa Add Cocoa graphics switching to glfwinfo 2019-03-27 15:59:36 +01:00
Doug Binks
c733ab0a22 Move glfwGetMonitorWorkarea test to monitors
This moves the test use of glfwGetMonitorWorkarea from the simple
example to the monitors test program.

Related to #1322.
2019-03-05 16:10:59 +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
Nathan Poirier
9e29f556fd Add GLFW_RAW_INPUT and glfwRawInputSupported
This adds runtime per-window control of whether accelerated or raw mouse
motion is provided when the cursor is disabled.

Fixes #1400.
Closes #1401.
2019-02-22 13:04:11 +01:00
Camilla Löwy
7f4dde15e4 Allow zero windows for events test
glfwWaitEvents is sane now, yay.
2019-01-25 12:46:46 +01:00
Camilla Löwy
9b0c16596c Add full screen option to tearing test 2019-01-17 00:12:11 +01:00
Camilla Löwy
f4a304ff03 Remove deprecated event from events test 2018-12-25 22:13:08 +01:00
Camilla Löwy
089ea9af22 Add GLFW_SCALE_TO_MONITOR
This adds the GLFW_SCALE_TO_MONITOR window hint for automatically
resizing the content area of a window to the requested size times the
monitor content scale each time it is placed on a new monitor.  This
only applies to windowed mode windows and includes the initial placement
at window creation.

This hint only has an effect on platforms where screen coordinates and
pixels always map 1:1 such as Windows and X11.  Platforms like macOS
instead change the resolution of the framebuffer independently of the
window size.

Related to #676.
Related to #1115.
2018-09-03 23:12:39 +02:00
Doug Binks
0be4f3f75a Add GLFW_FOCUS_ON_SHOW window hint and attribute
This adds a window hint and attribute for controlling whether
glfwShowWindow gives the specified window input focus in addition to
making it visible.

Fixes #1189.
Closes #1275.
2018-05-29 15:51:36 +02:00
Camilla Löwy
ab3bfb4205 Cocoa: Update MoltenVK support for LunarG SDK
GLFW now checks for the libvulkan.1.dylib loader instead of what is now
the ICD.  This removes checking for libMoltenVK.dylib to avoid cryptic
errors.  This unfortunately also breaks compatibility with the
standalone MoltenVK SDK.

This also removes support for the static loader library as that is not
present in the LunarG SDK.

Related to #870.
2018-03-01 21:45:46 +01:00
Caio Marcelo de Oliveira Filho
b88be7c1e9 Remove unused variable in opacity test 2018-03-01 08:29:04 +01:00
Camilla Löwy
ff6a8891d4 Make remaining tests set viewport in render loop 2018-02-07 16:46:51 +01:00
Camilla Löwy
370eac3c48 Add glfwSetWindowContentScaleCallback
Related to #677.
Related to #1115.
2018-01-09 18:00:22 +01:00
Camilla Löwy
3d493b60f1 Cleanup 2017-12-19 15:08:27 +01:00
Camilla Löwy
5f8431d7ca Update Nuklear to 2.00.4 2017-12-19 15:08:22 +01:00
Emmanuel Gil Peyrot
c3cba58a71 Remove trailing whitespace 2017-12-14 15:36:55 +01:00
Camilla Löwy
0e8c4ea7ce Add lock key modifier bits input mode
This adds the GLFW_MOD_CAPS_LOCK and GLFW_MOD_NUM_LOCK modifier bits.
Set the GLFW_LOCK_KEY_MODS input mode to enable these for all callbacks
that receive modifier bits.

Fixes #946.
2017-12-06 18:01:34 +01:00
Camilla Löwy
d81946a35b Add window mode toggling to tearing test 2017-12-06 18:01:33 +01:00
Camilla Löwy
df434c839a Add mapping file drop support to joystick test 2017-12-06 18:01:32 +01:00
Camilla Löwy
390a66d2e7 Fix missing header in gamma test 2017-11-28 14:20:54 +01:00
Camilla Löwy
1a250234ea Add revert button to gamma ramp test 2017-11-27 02:09:51 +01:00
Camilla Löwy
11e47f08b1 Add glfwGetWindowOpacity and glfwSetWindowOpacity
This adds support for setting the opacity of the whole window, including
any decorations.

Fixes #1089.
2017-11-15 15:46:01 +01:00
Camilla Löwy
546c99a3a3 Made sharing an example 2017-11-10 02:58:18 +01:00
Camilla Löwy
31cbb20ba2 Deprecate window parameter of clipboard functions 2017-11-10 02:52:16 +01:00
Camilla Löwy
16bf872117 Add content scale queries
This adds glfwGetWindowContentScale and glfwGetMonitorContentScale for
querying the recommended drawing scale factor for DPI-aware rendering.

Parts of this patch are based on code by @ferreiradaselva.

Fixes #235.
Fixes #439.
Fixes #677.
Fixes #845.
Fixes #898.
2017-10-26 17:26:36 +02:00
Camilla Löwy
56ecd62f58 Fix joystick test hat drawing 2017-10-03 00:41:55 +02:00
Camilla Löwy
07cc6e00da Add gamepad name to joysticks test 2017-10-02 17:32:21 +02:00
Camilla Löwy
ad9458a14c Clarify what glfwVulkanSupported means 2017-08-20 14:42:39 +02:00
Andrey Zholos
b4ea2d32e6 Add input lag test
Closes #973.
2017-08-18 13:01:47 +02:00
Camilla Löwy
5b7281bd41 Add glfwGetJoystickGUID
This function completes the first round of support for
SDL_GameControllerDB.

Fixes #900.
2017-07-30 16:15:12 +02:00
Camilla Löwy
85eda77d35 Update Nuklear to 1.40.0 2017-07-30 16:11:03 +02:00
Camilla Löwy
c0bc10427c Fix warnings in Vulkan test 2017-07-17 23:16:55 +02:00
Camilla Löwy
8e899ccc29 Cocoa: Add support for MoltenVK dynamic library
Tested with MoltenVK 0.18.0.

Related to #870.
2017-07-10 21:34:02 +02:00
Camilla Löwy
953106e74d Add support for SDL_GameControllerDB
This adds support for importing and applying mappings from the
SDL_GameControllerDB database.

Related to #900.
2017-07-07 15:52:33 +02:00
Camilla Löwy
bc7ebc1a89 Fix joystick test attention request
Fixes #1020.
2017-05-22 15:16:47 +02:00
Camilla Löwy
2f5e230338 Add attention request to joystick test 2017-05-11 20:10:28 +02:00
Camilla Löwy
43fc399cd1 Add hat button toggling to joystick test 2017-03-08 12:39:16 +01:00
Camilla Löwy
798d7c6d68 Implement glfwGetJoystickHats
This moves the buttons-as-hats logic to shared code and adds the
GLFW_JOYSTICK_HAT_BUTTONS input mode as a way to disable this legacy
behavior.

Fixes #889.
2017-03-06 03:23:29 +01:00
IntellectualKitty
368dec7ac7 Add glfwGetJoystickHats
This merges the public part of the glfwGetJoystickHats work by
@IntellectualKitty.  The implementation needs replacing due to
refactoring in preparation for gamecontrollerdb support.

Closes #906.
2017-03-05 23:20:07 +01:00
Camilla Löwy
6d9a58bfef Add glfwInitHint
This allows setting hints that control how the library is initialized,
transforming more compile-time options into run-time ones.
2017-03-01 04:35:41 +01:00
Camilla Löwy
e9560ef021 Add GLFW_OSMESA_CONTEXT_API
This allows the creation of OpenGL contexts via OSMesa on existing
platforms.  It does not add a compile- or link-time dependency on
OSMesa.

Fixes #281.
2017-02-28 20:38:10 +01:00
Camilla Löwy
106a617fa8 Update Nuklear to 1.33.0 2017-02-26 18:47:53 +01:00
Camilla Löwy
98bdd36231 Fix glfwVulkanSupported semantics 2017-02-07 21:28:50 +01:00
Camilla Löwy
afb5449ca4 Update Nuklear to 1.20 2017-02-07 19:12:22 +01:00
Camilla Löwy
c873327fe3 Fix NOTFOUND paths being added as dependencies
Fixes #930.
2017-01-20 01:29:46 +01:00
Camilla Löwy
9e56099edd Add glfwSetWindowAttrib
This function allows updating the GLFW_DECORATED, GLFW_RESIZABLE,
GLFW_FLOATING and GLFW_AUTO_ICONIFY attributes for existing windows.

Fixes #537.
2016-12-06 15:59:18 +01:00
Camilla Löwy
1252016b9c Add remaining GLSL version directives
Related to #864.
2016-12-05 14:16:56 +01:00
A. Tombs
1b17a5293c Add version directives to GLSL shaders
Although not technically required, I believe it is best practice for
shaders to specify which version of the GLSL spec they conform to.

Closes #864.
2016-12-05 14:06:39 +01:00
Camilla Löwy
f44307da4e Update Nuklear to 1.18
Fixes #907.
2016-12-03 20:35:17 +01:00
Camilla Löwy
11376a2dd0 Cleanup 2016-12-03 20:06:24 +01:00
Camilla Löwy
cc9168bda1 Win32: Fix build on VC++ 2008
This is not official support for VC++ 2008.

Fixes #821.
2016-12-03 20:06:23 +01:00
Camilla Löwy
f4d0c83181 Paperwork done 2016-11-30 14:00:41 +01:00
Camilla Berglund
2aee114950 Clarify glfwinfo output for no Vulkan extensions 2016-11-07 19:53:30 +01:00
Camilla Berglund
e94d16667b Cocoa: Add basic support for Vulkan via MoltenVK
This adds basic support for MoltenVK, a Vulkan implementation on top of
Metal, on macOS 10.11 and later.  It looks for MoltenVK in the process
via RTLD_DEFAULT symbol lookup if _GLFW_VULKAN_STATIC is disabled.

glfwCreateWindowSurface now creates and sets a CAMetalLayer for the
window content view, which is required for MoltenVK to function.

You must help CMake find MoltenVK for the Vulkan test to be built.

Fixes #870.
2016-11-01 21:39:54 +01:00
Camilla Berglund
85f867983f Update Vulkan test to 1.0.26.0
Fixes #727.
Fixes #758.
2016-11-01 21:34:26 +01:00
Camilla Berglund
efc6b35615 Rename joystick ID variables 2016-10-16 14:07:18 +02:00
Camilla Berglund
bf747e32b4 Remove unused variables in gamma test 2016-10-16 14:07:18 +02:00
Camilla Berglund
ef15735161 Make Escape exit threads test 2016-10-16 14:07:18 +02:00
Camilla Berglund
cc3036860a Add list window to joystick test 2016-10-06 19:08:35 +02:00
Camilla Berglund
2af40c3fe6 Update Nuklear to 1.156 2016-10-06 19:07:47 +02:00
Camilla Berglund
ea1958a948 Replace sprintf with snprintf 2016-09-30 05:31:07 +02:00
Camilla Berglund
9d42e146e7 Add aspect ratio to monitor test mode listing 2016-09-30 03:44:13 +02:00
Camilla Berglund
c156b50e4c Add glfwSetWindowMaximizeCallback
Fixes #778.
2016-09-29 01:24:56 +02:00
Camilla Berglund
cb860e8150 Fix gamma test rendering using wrong unit 2016-09-29 01:24:56 +02:00
Camilla Berglund
66ff4aae89 Convert joystick test to Nuklear 2016-09-27 02:13:55 +02:00