Commit graph

1206 commits

Author SHA1 Message Date
Rémi Verschelde
8623572b1f
Merge pull request #75666 from ronyeh/main.cpp-2
Rename `iconpath` => `icon_path` & `hasicon` => `has_icon`.
2023-06-02 17:26:18 +02:00
smix8
d171dfce9a Fix --debug-avoidance description.
Fixes c&p error in --debug-avoidance description.
2023-05-26 00:42:09 +02:00
Rémi Verschelde
390d87e974
Merge pull request #71352 from m4gr3d/editor_optimization_main
Improve startup benchmarking
2023-05-24 08:43:52 +02:00
Pedro J. Estébanez
e725b4b02b Allow threads to mark themselves as safe for nodes 2023-05-24 00:22:58 +02:00
Fredia Huya-Kouadio
831b4a5366 Improve startup benchmarking
Move the benchmarking measuring methods from `Engine` to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
2023-05-23 13:22:35 -07:00
Rémi Verschelde
411b6a95a0
Merge pull request #52314 from lawnjelly/four_delta_smooth
Add frame delta smoothing option (4.x)
2023-05-17 11:25:03 +02:00
lawnjelly
7925670f81 Add frame delta smoothing option (4.x)
Frame deltas are currently measured by querying the OS timer each frame. This is subject to random error. Frame delta smoothing instead filters the delta read from the OS by replacing it with the refresh rate delta wherever possible.

This PR also contains code to estimate the refresh rate based on the input deltas, without reading the refresh rate from the host OS.

The delta_smooth_enabled setting can also be modified at runtime through OS::, and there is also now a command line setting to override the project setting.
2023-05-16 13:57:25 +01:00
Rémi Verschelde
70dcfdab1f
Merge pull request #76446 from reduz/add-gdextension-api-compatibility
Add a backwards-compatibility system for GDExtension
2023-05-15 13:43:46 +02:00
Juan Linietsky
d8078d3f4c Add a backwards-compatibility system for GDExtension method
This adds a way to ensure that methods that were modified in the Godot API will continue working in older builds of GDExtension even if the new signature is different.

```C++
// New version (changed)
ClassDB::bind_method(D_METHOD("add_sphere","radius","position"),&MyShapes::add_sphere);
// Compatibility version (still available to extensions).
ClassDB::bind_compatibility_method(D_METHOD("add_sphere","radius"),&MyShapes::_compat_add_sphere);
```

**Q**: If I add an extra argument and provide a default value (hence can still be called the same), do I still have to provide the compatibility version?
**A**: Yes, you must still provide a compatibility method. Most language bindings use the raw method pointer to do the call and process the default parameters in the binding language, hence if the actual method signature changes it will no longer work.

**Q**: If I removed a method, can I still bind a compatibility version even though the main method no longer exists?
**A**: Yes, for methods that were removed or renamed, compatibility versions can still be provided.

**Q**: Would it be possible to automate checking that methods were removed by mistake?
**A**: Yes, as part of a future PR, the idea is to add a a command line option to Godot that can be run like : `$ godot --test-api-compatibility older_api_dump.json`, which will also be integrated to the CI runs.
2023-05-15 12:05:40 +02:00
Pedro J. Estébanez
9077bb9232 Fix multiple issues in WorkerThreadPool
- Fix project settings being ignored.
- Made usages of `native_thread_allocator` thread-safe.
- Remove redundant thread-safety from `low_priority_threads_used`, `exit_threads`.
- Fix deadlock due to unintended extra lock of `task_mutex`.
2023-05-11 16:10:09 +02:00
Pedro J. Estébanez
8983b20ccd Avoid interaction issues between resource loading threads 2023-05-10 18:53:41 +02:00
Rémi Verschelde
5271186f2f
Merge pull request #75901 from reduz/refactor-node-processing
Refactor Node Processing to allow Scene Multithreading
2023-05-10 12:46:44 +02:00
smix8
a6ac305f96 Rework Navigation Avoidance
Rework Navigation Avoidance.
2023-05-10 05:01:58 +02:00
Rémi Verschelde
6bca6beea3
Merge pull request #76878 from RedworkDE/tests-fix-errors
Fix various errors when running the unit tests
2023-05-09 19:28:54 +02:00
Rémi Verschelde
10ed1d87df
Merge pull request #76490 from dsnopek/dump-gdscript-docs
Dump API docs from inline GDScript comments using --doctool --gdscript-docs PATH
2023-05-09 19:28:30 +02:00
Juan Linietsky
98c655ec8d Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.

This is the first steps towards implementing https://github.com/godotengine/godot-proposals/issues/6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
2023-05-09 19:17:51 +02:00
RedworkDE
8e7afec479 Fix various errors when running the unit tests
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-05-09 18:40:56 +02:00
Rémi Verschelde
1a987eb9ba
Merge pull request #76624 from myaaaaaaaaa/movie-stat
Print CPU and GPU usage statistics after Movie Maker is finished
2023-05-09 10:45:35 +02:00
myaaaaaaaaa
c55892cc5c Print CPU and GPU usage statistics after Movie Maker is finished 2023-05-08 12:02:52 -04:00
David Snopek
a64137d5dd Dump API docs from inline GDScript comments using --doctool --gdscript-docs PATH 2023-05-08 11:00:29 -05:00
Juan Linietsky
273a6eeb66 Redo how the remote filesystem works
Instead of reading files over the network, the new version uses a local file cache and only updates files when it changes.

The original remote filesystem was created 14 years ago, when ethernet was faster than hard drives or even flash. Also, mobile devices have a very small amount of storage.
Nowadays, this is no longer the case so the approach is changed to using a persistent cache in the target device.

Co-authored-by: m4gr3d
2023-05-08 11:57:54 +02:00
Rémi Verschelde
67ccb5a739
Merge pull request #73617 from myaaaaaaaaa/quit-after
Add `--quit-after <number-of-iterations>`
2023-04-26 11:35:52 +02:00
myaaaaaaaaa
03dafc7bc6 Add --quit-after <number-of-iterations> 2023-04-25 13:46:32 -04:00
Juan Linietsky
a37c30dfc9 Fix thread IDs.
On Linux, thread IDs were not properly assigned with the current approach.
The line:
`std::thread new_thread(&Thread::callback, _thread_id_hash(thread.get_id()), p_settings, p_callback, p_user);`
does not work because the thread ID is not assigned until the thread starts.

This PR changes the behavior to use manually generated thread IDs. Additionally, if a thread is (or may have been created) outside Godot, the method `Thread::attach_external_thread` was added.
2023-04-24 15:13:58 +02:00
bruvzg
520a8d8ed2
Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method. 2023-04-19 08:54:53 +03:00
Pedro J. Estébanez
f5602869da Cache classes editor help 2023-04-13 12:16:47 +02:00
Ron B. Yeh
c8cbc67156 Rename iconpath => icon_path & hasicon => has_icon. 2023-04-04 17:05:37 -07:00
Yuri Sizov
3596443de1
Merge pull request #74727 from AThousandShips/project_settings
Exposing more project settings for documentation
2023-03-15 15:59:10 +01:00
Ninni Pipping
bd30847e59 Exposing more project settings for documentation 2023-03-15 14:25:40 +01:00
Yuri Sizov
c981a305a5
Merge pull request #73144 from chutchinson/bug/openxr-init-alert-dialog
Replaced OpenXR operating system alert dialog with a warning log message
2023-03-15 14:07:05 +01:00
Yuri Sizov
8402927d3f Prevent crashing on startup if project has scripted theme types
Also avoid order of operation conflicts by moving C# binding generation hook to main.cpp
2023-03-08 11:17:21 +01:00
Rémi Verschelde
0a9deaa440
Warn users when using non existing --export flag, replaced by --export-release
See #73782.
2023-02-22 22:20:57 +01:00
Hugo Locurcio
aa386472e1
Mark Application Icon and V-Sync Mode project settings as basic
These settings are likely to be changed at some point in most projects.
2023-02-19 01:47:21 +01:00
Travis Veralrud
10be2c343f
iOS: Fix memory leak on touch input
Replace incomplete iOS gesture with touch implementation.

Fixes #66422.
2023-02-15 09:45:38 +01:00
Chris Hutchinson
cb8e919243 Replaced operating system alert dialog with a warning log message,
toggled by a project setting.
Fixes #73141
2023-02-13 18:42:43 -05:00
Rémi Verschelde
cb2e73d578
Merge pull request #73033 from akien-mga/gdscript-fix-gd4-renames-build
Clean up ProjectConverter3To4 architecture, move renames map to separate file
2023-02-11 22:05:38 +01:00
Rémi Verschelde
e19e6b09b9
Clean up ProjectConverter3To4 architecture, move renames map to separate file
This allows properly limiting what features depend on the RegEx module
(doing the actual conversion) and what features only require the renames
data (GDScript suggestions).

Also better excludes the conversion command line options when actually
disabling deprecated code.

Fixes #73029.
2023-02-10 14:35:22 +01:00
Josh Jones
f978d74fd0 Allow compiling out the navigation module 2023-02-09 23:04:16 -08:00
Rémi Verschelde
c197b398c3
Fix build with deprecated=no not exclude ProjectConverter3To4 options
Fixes #72520.
2023-02-01 22:29:51 +01:00
Rémi Verschelde
1dfd236f15
Merge pull request #70377 from dsnopek/server-export-mk2
Add "dedicated server" export mode which can strip unneeded visual resources
2023-01-23 22:13:28 +01:00
David Snopek
74458b6e9b Add "dedicated server" export mode which can strip unneeded visual resources 2023-01-23 13:24:54 -06:00
bruvzg
15dafc49d3
[TextServer] Fix ICU data loading and exporting with internationalization/locale/include_text_server_data setting. 2023-01-23 21:13:32 +02:00
Hugo Locurcio
33e9dff3de
Mark touch emulation project settings as basic
These settings are likely to be toggled often during development,
so they should be as accessible as possible.
2023-01-23 10:07:47 +01:00
Rémi Verschelde
cd031fd31a
Merge pull request #71663 from bruvzg/init_pos_x
Reorganize main and sub-window initial position properties.
2023-01-22 11:25:58 +01:00
Rémi Verschelde
abad6ea55c
Merge pull request #68002 from dogboydog/csharp_build_exit_code
Exit editor with non-zero return code if --build-solutions fails
2023-01-21 11:31:58 +01:00
Rémi Verschelde
f461a005bd
doc: Define dummy Mono settings to keep them in doctool
Revival of #54840.
2023-01-20 13:13:38 +01:00
bruvzg
aade5abd4f
Reorganize main and sub-window initial position properties. 2023-01-19 13:44:06 +02:00
Rémi Verschelde
cd0a9ccdfd
Merge pull request #71515 from akien-mga/disable-mangohud-editor
Force disable Vulkan overlays in the editor and project manager
2023-01-19 10:10:17 +01:00
bruvzg
cb11bc9d6d [Windows] Fix main window project icon not set when using editor executable. 2023-01-19 09:50:01 +02:00
Rémi Verschelde
12817543a9
Force disable Vulkan overlays in the editor and project manager
MangoHud would be shown on every popup in multi-window mode, and seemed
to cause rendering issues for various users.

There are also issues with RTSS, and VkBasalt also doesn't seem
particularly good to use in the editor.

All these stay available to enable when running the project itself,
including running from the editor (so running the editor after e.g.
`export MANGOHUD=1` in the environment will ignore it for the editor,
but use it when playing the project).

Fixes #57403.
Fixes #57937.
2023-01-18 08:58:06 +01:00