Commit Graph

72 Commits

Author SHA1 Message Date
Clay John 8a10bb7d0d
Use OpenGL 3.3 core profile instead of compatibility profile
- Rename OpenGL to GLES3 in the source code per community feedback.
  - The renderer is still exposed as "OpenGL 3" to the user.
- Hide renderer selection dropdown until OpenGL support is more mature.
  - The renderer can still be changed in the Project Settings or using
    the `--rendering-driver opengl` command line argument.
- Remove commented out exporter code.
- Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-31 15:56:45 +01:00
Hugo Locurcio ce97ddbcb1
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
- Use lowercase driver names for the `--rendering-driver`
  command line argument.
2021-10-30 02:05:49 +02:00
M. Huri 033dc4dbef Replaced NULL with nullptr 2021-10-12 20:20:19 +07:00
Frixuu 650e63a7ca Allow for mapping keycodes to current layout 2021-09-21 00:03:02 +02:00
Daniel Kariv 52b114bc78 fix fullscreen issue on macOS
adds a call for resize event.
2021-09-03 14:35:28 +03:00
Pedro J. Estébanez dc187324be Add input buffering framework
Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses.

For desktop OSs it's currently not feasible given main and UI threads are the same).
2021-08-13 11:19:19 +02:00
Pedro J. Estébanez 7c864d41c9 Improve input event accumulation
- API has been simplified: all events now go through `parse_input_event()`. Whether they are accumulated or not depends on the `use_accumulated_input` flag.
- Event accumulation is now thread-safe (it was not needed so far, but it prepares the ground for the following changes).
- Touch drag events now support accumulation.
2021-08-13 11:19:19 +02:00
Aaron Franke fa3a32a2d6
Use Key enum instead of plain integers 2021-08-10 16:26:55 -05:00
bruvzg ae7dbb678c [macOS] Move captured mouse cursor to the center when window gain focus. 2021-08-08 22:27:57 +03:00
bruvzg 618eb27e8b Move `alert` function from `DisplayServer` to `OS`. 2021-07-22 21:50:35 +03:00
Hendrik Brucker 043ae91560 Restructure and reimplement vsync options
-Add a v-sync mode setting which allows to choose between DISABLED, ON, ADAPTIVE and MAILBOX
-Removed the V-Sync via Compositor option
2021-07-06 16:34:26 +02:00
bruvzg f7797bf1b3 [macOS] Fix custom mouse cursor not set after mouse mode change. 2021-06-23 10:51:01 +03:00
Aaron Franke 0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00
Lightning_A e28fd07b2b Rename `instance()`->`instantiate()` when it's a verb 2021-06-19 20:49:18 -06:00
Aaron Franke 98aa3b669e
Add MOUSE_MODE_CONFINED_HIDDEN
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-06-03 11:44:28 -04:00
Marcel Admiraal da5d7db610 Rename File::get_len() get_length() 2021-05-25 11:54:28 +01:00
bruvzg d14eae141e
[macOS] Allow "on top" windows to enter full-screen mode. 2021-05-24 10:53:01 +03:00
Rémi Verschelde 6c367f8e0d
Merge pull request #48168 from LightningAA/control-to-ctrl-4.0 2021-05-17 17:38:02 +02:00
Pedro J. Estébanez 469fa47e06
Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-17 15:06:19 +02:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Aaron Franke 0de9a7d803
Rename `doubleclick` to `double_click` 2021-05-04 04:38:08 -04:00
Rémi Verschelde 5b16020846
Replace remaining uses of `NULL` with `nullptr`
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-29 11:53:27 +02:00
Marcel Admiraal fd30c36985 Rename Texture.get_data() to get_image() 2021-03-28 13:00:46 +01:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
bruvzg d756f6a294
[macOS] Ignore mouse move event caused by mouse mode switch. 2021-02-15 00:20:50 +02:00
Marcel Admiraal 2a74b388d0 Split OS::execute into two methods
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
bruvzg 39bcc77d6a
[4.0] Fix file drag-drop on M1 Macs. 2020-12-23 18:00:50 +02:00
reduz 2787ad65be RenderingServer reorganization 2020-12-04 18:39:46 -03:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
bruvzg 801f0a041f
[macOS] Suppress momentum scrolling after key press or modifier change to prevent unexpected change of action. 2020-10-13 18:58:55 +03:00
bruvzg b0152dcac5
Fix `screen_get_dpi` on macOS for non fractional display scales and restore documentation. 2020-10-01 22:52:20 +03:00
bruvzg f4a2eabf42
[macOS] Fix mouse position in captured mode. 2020-09-25 08:55:07 +03:00
bruvzg 6a14c72b12
Add window click-through support. 2020-09-17 12:36:18 +03:00
Rémi Verschelde 2a8531cc56
Merge pull request #41456 from nekomatata/x11-fix-popups
Popup fixes for X11 display server
2020-09-03 00:09:19 +02:00
bruvzg 9a85948907
[macOS] Fix heap use-after-free in DisplayServer. 2020-08-25 14:04:20 +03:00
PouleyKetchoupp 2b49cb0b73 Re-apply "Fixes for windows in X11 tiling WMs"
From PR #38727 which was reverted in #41373 because of regressions in Ubuntu
with Gnome.

Co-authored-by: Lorenzo Cerqua <lorenzocerqua@tutanota.com>
2020-08-22 18:42:42 +02:00
Juan Linietsky 9c5c1635b2
Revert "Fixes for windows in X11 tiling WMs" 2020-08-19 12:37:59 -03:00
bruvzg 9d1cf0b6af
Fix "on top" incorrectly set on init (all platforms).
Fix "on top" reseting on window update. (macOS).
2020-08-15 17:53:18 +03:00
Rémi Verschelde 33b2070d2e Remove obsolete GLES2 backend code
This code currently isn't compiled (and cannot compile).

We plan to re-add OpenGL ES-based renderer(s) in Godot 4.0 alongside Vulkan
(probably ES 3.0, possibly also a low-end ES 2.0), but the code will be quite
different so it's not relevant to keep this old Godot 3.2 code.

The `drivers/gles2` code from the `3.2` branch can be used as a reference for
a potential new implementation.
2020-08-13 10:04:53 +02:00
bruvzg a05776e20d
[macOS] Refocus last key window after `DisplayServer::alert` is closed. 2020-07-26 23:00:49 +03:00
Rémi Verschelde 3842e8c465
Merge pull request #38727 from Riteo/tiling-wm-issues-tests
Fixes for windows in X11 tiling WMs
2020-07-26 17:41:28 +02:00
bruvzg 4c0081105f
[macOS] Prevent setting `BORDERLESS` flag and calling `window_move_to_foreground` from giving focus to window with `NO_FOCUS` flag. 2020-07-26 15:46:07 +03:00
Lorenzo Cerqua d670a49612 DisplayServer: separate window showing into another function
When creating a window, Godot would first register it to the WM(show it) and then set its flags.
This works fine on a floating WM, but on tiling WMs as soon as a window gets registered
the WM immediately acts on the window by scaling it up and treating it as a generic window,
being registered without any special flags.

This commit separates the showing of the window into another function and calls it after the most important flags are set,
making windows with special flags(eg. all popups) work again on tiling WMs.

Fixes #37930
2020-07-23 07:58:10 +02:00
Rémi Verschelde a5fb445121
Merge pull request #40450 from asmaloney/spelling
Fix spelling & grammar in comments, docs, and messages
2020-07-21 22:14:04 +02:00
Andy Maloney 4dda62f591 Fix spelling & grammar in comments, docs, and messages 2020-07-21 15:17:23 -04:00
PouleyKetchoupp ce34b77c4a Fix MoltenVK layer creation when compiling with OSXCross 2020-07-21 12:37:20 +02:00
Rémi Verschelde c8523038cc
Merge pull request #40268 from DanielZTing/master
Fix cancel/OK button order on macOS
2020-07-15 09:21:04 +02:00
bruvzg 850bbabe56
[macOS] Fix window size on macOS Big Sur (title bar height is no longer same as menu height), use top-left corner as resize origin instead of bottom-left. 2020-07-14 15:09:46 +03:00
bruvzg 996910b627
Add error messages if Vulkan init failed, prevent Vulkan context freeing uninitialized device and instance. 2020-07-13 19:24:21 +03:00