Commit graph

36903 commits

Author SHA1 Message Date
Rémi Verschelde 1833c8b233
Merge pull request #51587 from Calinou/use-unicode-multiplication-symbol
Use the Unicode multiplication symbol where relevant
2021-08-13 14:27:48 +02:00
Rémi Verschelde 3a3be769b8
Merge pull request #51597 from RandomShaper/input_buffering 2021-08-13 12:44:15 +02:00
Rémi Verschelde 52d07e7ef0
Merge pull request #51616 from bruvzg/cam_feed_rid
Add placeholder textures to ensure CameraTexture / CameraFeed always have valid RIDs.
2021-08-13 12:43:59 +02:00
Pedro J. Estébanez e745088f1f Switch to input buffering on Android
Key, touch and joystick events will be passed directly from the UI thread to Godot, so they can benefit from agile input flushing.

As another consequence of this new way of passing events, less Java object are created at runtime (`Runnable`), which is good since the garbage collector needs to run less.

`AndroidInputHandler` is introduced to have a smaller cross-thread surface. `main_loop_request_go_back()` is removed in favor just inline calling `send_window_event()` at the most caller's convenience (i.e., leveraging the new `p_deferred`` parameter as appropriate).

Lastly, `get_mouse_position()` and `get_mouse_button_state()` now just call through `Input` to avoid the need of sync of mouse data tracked on the UI thread.
2021-08-13 11:45:50 +02:00
Pedro J. Estébanez abdfbef075 Add project setting for agile input event flushing
If enabled, key/touch/joystick events will be flushed just before every idle and physics frame.

Enabling this can greatly improve the responsiveness to input, specially in devices that need to run multiple physics frames per each idle frame, because of not being powerful enough to run at the target frame rate.

This will only work for platforms using input buffering (regardless event accumulation). Currenly, only Android does so, but could be implemented for iOS in an upcoming PR.
2021-08-13 11:45:50 +02:00
Rémi Verschelde d8a8d32f2e
Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@angad-k, @Bhu1-V, @Blackiris, @ellenhp, @fabriceci, @follower,
@foxydevloper, @Geometror, @hilfazer, @hoontee, @Janglee123,
@Razoric480, @SirQuartz, @theoway.

Thanks to all contributors and donors for making Godot possible!
2021-08-13 11:45:08 +02:00
bruvzg 8f70232a15 Add placeholder textures to ensure CameraTexture / CameraFeed always have valid RIDs. 2021-08-13 12:32:01 +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
Rémi Verschelde 39efccf3b8
Merge pull request #50767 from KoBeWi/no_head_no_save
Don't save project on startup in no window mode
2021-08-13 11:08:08 +02:00
AndreaCatania 98ceb60eb4 Refactors the memnew_placement.
With this commit the macro `memnew_placement` uses the standard memory
placement syntax: `new (mem) TheClass()`, and removes the outdated and
not used syntax:
```
_ALWAYS_INLINE_ void *operator new(size_t p_size, void *p_pointer, size_t check, const char *p_description) {
```

Thanks to this change, the function `memnew_placement` call is compatible with
any class, and can also initialize classes with non-empty constructor:
```
// This is valid, like before.
memnew_placement(mem, Variant);

// This works too:
memnew_placement(mem, Variant(123));
```
2021-08-13 10:18:34 +02:00
Rémi Verschelde 2a40a58182
Merge pull request #51611 from AnilBK/fix-duplicates
[cppcheck] Fix  Duplicate Conditions
2021-08-13 10:06:09 +02:00
kobewi ea2489ce93
Don't save project on startup in headless mode 2021-08-13 09:57:46 +02:00
Yuri Roubinsky eadf9d92f9
Merge pull request #51609 from Chaosus/shader_fix_varying_error
Fix shader crash when using local var with the same name as varying
2021-08-13 10:37:53 +03:00
Rémi Verschelde af70288ee0
Merge pull request #51586 from m4gr3d/investigate_godot_resume_stalls_master
Resolve issue where the Godot app remains stuck when resuming.
2021-08-13 08:43:59 +02:00
Rémi Verschelde 4c53669d8a
Merge pull request #51524 from RandomShaper/faster_vma
Upgrade Vulkan Memory Allocator, use Volk on Android
2021-08-13 08:42:58 +02:00
Rémi Verschelde d4c04a9b43
Merge pull request #51606 from m4gr3d/expose_fragile_user_data_config_master
Add support for prompting the user to retain app data on uninstall.
2021-08-13 08:41:58 +02:00
Anilforextra d73d8b8d78 Fix duplicate conditions. 2021-08-13 12:22:38 +05:45
Yuri Roubinsky fa96c98bdf Fix shader crash when using local var with the same name as varying 2021-08-13 09:20:16 +03:00
clayjohn 5fce0b3cb5 Use hint_albedo in SkyMaterials 2021-08-12 23:00:50 -07:00
Aaron Franke eb4902a455
Fix some unnecessary includes 2021-08-13 00:27:38 -05:00
Fredia Huya-Kouadio e73e336e3b Add support for prompting the user to retain app data on uninstall.
Supported on Android 10 and higher.
2021-08-12 22:16:14 -07:00
Anilforextra c350a33898 Convert ustring macros to inline functions and use them wherever possible.
Add new inline functions to check if a character is lowercase or uppercase.

Remove unused upper case macro.
2021-08-13 10:32:29 +05:45
Fredia Huya-Kouadio 28a99e4cf6 Resolve issue where the Godot app remains stuck when resuming.
This was caused by the fact that a new instance of Godot was created at resume while a previous instance already existed.
The previous instance would then go through its cleanup lifecycle, and would thus attempt to close the entire app, leading to the system to restart the app, thus starting the cycle anew.
The fix involves reusing the previous instance of Godot if one is available instead of creating a new one, as well as giving control to the host activity for how the process should be terminated.
2021-08-12 21:05:18 -07:00
Bastiaan Olij 07fd559478 Implemented raster versions of bokeh shaders to replace broken gaussian implementation 2021-08-13 10:20:14 +10:00
Pedro J. Estébanez 7b7e17a626 Upgrade Vulkan memory allocator 2021-08-13 00:05:41 +02:00
Rémi Verschelde 554312a3b2
Android: Use volk instead of NDK Vulkan headers
We no longer build the Vulkan loader, and volk lets us load it dynamically.
Roblox uses volk on Android so it should work well for us too.
2021-08-12 23:39:30 +02:00
Rémi Verschelde a98589a449
Merge pull request #51581 from bruvzg/camera_feed_port
Port camera feed to the new RenderingServer API.
2021-08-12 23:28:10 +02:00
Hugo Locurcio 7612cff432
Use the Unicode multiplication symbol where relevant 2021-08-12 21:45:33 +02:00
Rémi Verschelde 56ac302dc4
Merge pull request #51580 from aaronfranke/particles-real-double
Use real_t and double where appropriate in Particles
2021-08-12 20:51:21 +02:00
Rémi Verschelde 1a9c8aaba9
Merge pull request #51558 from fabriceci/fix-move-and-slide-regression-multiple-collision-4
Fix move and slide regression by allowing multiple collision direction
2021-08-12 20:37:30 +02:00
Rémi Verschelde 244295a0c2
Merge pull request #51579 from Calinou/doc-editorfilesystem-get-file-type
Fix incorrect descriptions for EditorFileSystem's `get_file_type()`
2021-08-12 20:36:20 +02:00
Rémi Verschelde 5e0838c58e
Merge pull request #50372 from Paulb23/code_edit_breakpoint_fixes
Fix breakpoint toggle signal not firing when expected
2021-08-12 20:33:56 +02:00
Yuri Roubinsky b2b33ce4f6
Merge pull request #51572 from Chaosus/vs_fix_transform_instance
Fix printing error about unsupported modifier on `TransformUniform`
2021-08-12 21:23:18 +03:00
Rémi Verschelde 71873057bc
Merge pull request #51536 from Calinou/nearest-mipmap-use-nearest-for-minification
Use nearest mipmaps for both minification and magnification
2021-08-12 20:21:18 +02:00
bruvzg de30dfe6a5 Port camera feed to the new RenderingServer API. 2021-08-12 20:46:19 +03:00
Yuri Roubinsky c43b7c113f Fix printing error about unsupported modifier on TransformUniform 2021-08-12 19:40:45 +03:00
Hugo Locurcio 1942e0c117
Fix incorrect descriptions for EditorFileSystem's get_file_type() 2021-08-12 18:38:57 +02:00
Aaron Franke 03e2544d50
Use real_t and double where appropriate in Particles 2021-08-12 11:35:31 -05:00
Hugo Locurcio fd29432aab
Use nearest mipmaps for both minification and magnification
This is generally the expected behavior when using a nearest + mipmaps
mode, as it's often used for pixel art games.
2021-08-12 18:24:10 +02:00
Rémi Verschelde c89ad92c96
Merge pull request #51532 from nekomatata/layer-mask-accessors
Uniformize layer names, script methods and documentation
2021-08-12 17:55:11 +02:00
Rémi Verschelde 6f043f7a19
Merge pull request #50771 from naithar/feature/platform-export-refactoring-4.0 2021-08-12 17:22:43 +02:00
Rémi Verschelde d10bfe8e24
i18n: Sync translations with Weblate
And sync template with current 3.x codebase.

(cherry picked from commit f3441fcff0)
2021-08-12 17:10:01 +02:00
PouleyKetchoupp 989acbbe81 Uniformize layer names, script methods and documentation
- Back to 1-based layer names to make it clearer in editor UI
- Layer bit accessors are renamed to layer value and 1-based too
- Uniform errors and documentation in render and physics
- Fix a few remaining collision_layer used in place of collision_mask
2021-08-12 08:06:42 -07:00
Rémi Verschelde 09198bf9e2
Merge pull request #51571 from mbrlabs/end-him-rightly
Properly finish Godot's Android activity when destroyed by the system
2021-08-12 16:56:24 +02:00
Sergey Minakov 253581f85c Split uwp platform export template into multiple files 2021-08-12 17:18:37 +03:00
Sergey Minakov 9f49255bee Split javascript export template into multiple files 2021-08-12 17:18:36 +03:00
Sergey Minakov 6627f18e0f Split windows platform export template into multiple files 2021-08-12 17:18:36 +03:00
Sergey Minakov d18dc7f41c Split osx platform export template into multiple files 2021-08-12 17:18:34 +03:00
Sergey Minakov ed49e038ec Split android platform export template into multiple files 2021-08-12 17:15:02 +03:00