Commit Graph

1448 Commits

Author SHA1 Message Date
Stuart Carnie
2d0165574d
Add Metal support for macOS (arm64) and iOS 2024-08-20 12:11:06 +02:00
Bastiaan Olij
a8c5117777 Change hand tracking project settings and finetune show_when_tracked 2024-08-20 11:12:52 +10:00
Hugo Locurcio
a2043f124d
Improve error messages for invalid rendering drivers/methods on the command line
- Deduplicate rendering driver names.
- Tweak grammar and punctuation to be consistent across both messages.
- Use "rendering method" terminology in the relevant error message.

Preview:

`--rendering-driver unknown`:

    Unknown rendering driver 'unknown', aborting.
    Valid options are 'vulkan', 'opengl3', 'opengl3_es' and 'dummy'.

`--rendering-method unknown`:

    Unknown rendering method 'unknown', aborting.
    Valid options are 'forward_plus', 'mobile' and 'gl_compatibility'.
2024-08-18 23:57:54 +02:00
Rémi Verschelde
1bd740d18d
Merge pull request #95656 from anvilfolk/gdscript-docs-quit
Fix Godot not quitting with `--doctool --gdscript-docs`.
2024-08-17 00:47:17 +02:00
ocean
13b20820ba Fix Godot not quitting with --doctool --gdscript-docs. 2024-08-16 18:18:45 -04:00
Rémi Verschelde
82adfebcf8
Merge pull request #94799 from m4gr3d/memory_allocation_cleanup_and_optimizations
Android memory cleanup and optimizations
2024-08-16 23:45:39 +02:00
Rémi Verschelde
dbf4be308c
Merge pull request #93583 from smix8/obstacle_monitor
Add navigation obstacles to performance monitor stats
2024-08-16 23:45:10 +02:00
Fredia Huya-Kouadio
a57a99f5bc Memory cleanup and optimizations
- Returns an empty list when there's not registered plugins, thus preventing the creation of spurious iterator objects

- Inline `Godot#getRotatedValues(...)` given it only had a single caller. This allows to remove the allocation of a float array on each call and replace it with float variables

- Disable sensor events by default. Sensor events can fired at 10-100s Hz taking cpu and memory resources. Now the use of sensor data is behind a project setting allowing projects that have use of it to enable it, while other projects don't pay the cost for a feature they don't use

- Create a pool of specialized input `Runnable` objects to prevent spurious, unbounded `Runnable` allocations

- Disable showing the boot logo for Android XR projects

- Delete locale references of jni strings
2024-08-16 09:27:41 -07:00
Rémi Verschelde
f01e052162
Merge pull request #95549 from timothyqiu/split-translation-server
Split `TranslationServer` into its own file
2024-08-16 14:36:16 +02:00
Rémi Verschelde
a88b828eb0
Merge pull request #95513 from bruvzg/ds_init_cleanup
Run cleanup code on DisplayServer init failure to prevent crash on exit.
2024-08-16 14:35:26 +02:00
Rémi Verschelde
1d4303c1fe
Merge pull request #95502 from bruvzg/net_ext_detect
[.NET] Move search in files extension list definition to be after Scene level module init.
2024-08-16 14:35:12 +02:00
Rémi Verschelde
28c92bd8ca
Merge pull request #95520 from bruvzg/angle_gen7and8
[Windows] Add Intel Gen7.5/Gen8/Gen9 GPUs to Angle blocklist.
2024-08-16 10:36:39 +02:00
Rémi Verschelde
46c6865979
Merge pull request #92391 from rburing/fti_3d
Physics interpolation (3D)
2024-08-16 10:33:37 +02:00
bruvzg
d222921f06
[Windows] Add Intel Gen7.5/Gen8/Gen9 GPUs to Angle blocklist. 2024-08-15 23:13:49 +03:00
Haoyu Qiu
7343dc3a5d Split TranslationServer into its own file 2024-08-15 15:00:47 +08:00
bruvzg
f15ad72355
Run cleanup code on DisplayServer init failure to prevent crash on exit. 2024-08-14 11:36:29 +03:00
bruvzg
69d52ed081
[.NET] Move search in files extension list definition to be after Scene level module init. 2024-08-14 00:16:09 +03:00
Hugo Locurcio
da4683c71e
Use the Dummy audio driver in the project manager
This prevents Godot from appearing in the list of applications
outputting sound in the OS while the user is in the project manager.
2024-08-07 01:27:12 +02:00
Rémi Verschelde
9a8f18b9bf
Merge pull request #94796 from kus04e4ek/backfall
Windows: Fall back to D3D12 if Vulkan is not supported and vice versa
2024-07-29 15:17:26 +02:00
Kusok
d30c1e6a8f Fall back to D3D12 if Vulkan is not supported and vice versa 2024-07-27 16:17:20 +08:00
Riteo
755dbde873 Apply prefer_wayland only if no display driver is set
Before this patch any other display driver preference would be
overridden.
2024-07-26 07:29:34 +02:00
Samuele Panzeri
d0bcac8197 Remember editor window mode, screen, size and position on restart 2024-07-23 00:32:12 +02:00
Rémi Verschelde
84af5c1c46
Merge pull request #88065 from Riteo/ds-pref-consistent
Handle display driver preferences consistently between editor and projects
2024-07-22 17:30:21 +02:00
Alvin Wong
baf1cdabd1 End benchmark of Main::Setup properly before calling setup2 2024-07-21 21:46:01 +08:00
Rémi Verschelde
f649112dfc
Merge pull request #94116 from bruvzg/ed_quit_unload
[Editor] Unload addons when using `--import` or `--quit`.
2024-07-19 11:10:37 +02:00
Rémi Verschelde
1e81a946cc
Merge pull request #94412 from dsnopek/xr-always-render
Always render when XR is enabled, even if no OS windows can draw
2024-07-18 15:38:14 +02:00
David Snopek
7a5a8597eb Always render when XR is enabled, even if no OS windows can draw 2024-07-17 08:19:21 -05:00
Rémi Verschelde
fe427ff203
Merge pull request #94404 from clayjohn/android-clear-color
Restore default clear color after displaying boot splash
2024-07-17 11:44:23 +02:00
Rémi Verschelde
496fd12b17
Merge pull request #94052 from m4gr3d/clean_input_dispatch_settings
Cleanup Android input on render thread settings
2024-07-17 11:42:52 +02:00
clayjohn
999c7e0392 Restore default clear color after displaying boot splash
On Android the boot splash can be shown at a different time, so the clear color restore needs to happen within the `setup_boot_logo` function
2024-07-15 14:00:05 -07:00
Yuri Rubinsky
af5fc8354b Fix a bunch of orphan StringName errors at ProjectSettings/Editor exit 2024-07-09 19:38:52 +03:00
Fredia Huya-Kouadio
5e59819727 Cleanup Android input on render thread settings
Follow up to https://github.com/godotengine/godot/pull/93933
Clean up the set of settings use to control whether Android input should be dispatched on the render thread.

Addresses comments in https://github.com/godotengine/godot/pull/93933#issuecomment-2210437977
2024-07-09 09:15:18 -07:00
bruvzg
c151c7dce0
[Editor] Unload addons when using --import or --quit. 2024-07-09 09:54:41 +03:00
Ricardo Buring
2f8ab4a654 Fixed Timestep Interpolation (3D)
Adds 3D fixed timestep interpolation to the rendering server.
This does not yet include support for multimeshes or particles.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-07-07 22:15:23 +02:00
Ricardo Buring
23521635d2 Fix physics tick counter
The counter is now incremented at the start of a physics tick rather than at the end.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-07-07 19:04:05 +02:00
Fredia Huya-Kouadio
6b6428d779 Fix ANRs reported by the Google Play Console
- Add support for dispatching input on the render thread (UI thread is the current default) when `input_buffering` and `accumulated_input` are disabled. At the expense of latency, this helps prevent 'heavy' applications / games from blocking the UI thread (the default behavior)  which may cause the application to ANR.

- Remove GLSurfaceView logic causing the UI thread to wait on the GL thread during lifecycle events. The removed logic would cause the UI thread to ANR when the GL thread is blocked.
2024-07-04 05:18:50 -07:00
Fredia Huya-Kouadio
c6a23a7a7d Fix crashes reported by the Google Play Console 2024-07-04 02:46:11 -07:00
Fredia Huya-Kouadio
637f4a10ed Fix the issue causing the logo to not show when using the compatibility renderer 2024-07-03 11:16:45 -07:00
kobewi
91eb679fc3 Allow more image types for some project settings 2024-06-29 17:47:20 +02:00
smix8
f9876d3a88 Add navigation obstacles to performance monitor stats
Adds navigation obstacle count to navigation performance monitor.
2024-06-25 05:17:27 +02:00
Fredia Huya-Kouadio
f20e21a6d6 Update the splash screen logic for the Godot app template
Due to limitations to the splash screen introduced in Android 12, the splash screen logic is updated to the same logic as used on other platforms, i.e: the splash screen is rendered by the Godot engine instead of the Android runtime.
2024-06-10 00:59:36 -07:00
Rémi Verschelde
4bf961e007
Merge pull request #92733 from raulsntos/core/memdelete-engine-later-but-not-that-late
Release Engine before unregistering core types
2024-06-04 10:10:21 +02:00
Raul Santos
d1ab5d3717
Release Engine before unregistering core types 2024-06-03 19:17:30 +02:00
Rémi Verschelde
0d11108a01
Merge pull request #79126 from bruvzg/SteamTime
Enable optional minimal SteamAPI integration for usage time tracking (editor only).
2024-06-03 12:42:38 +02:00
bruvzg
c34d64669e
Enable optional minimal SteamAPI integration for usage time tracking (editor only). 2024-05-31 11:01:02 +03:00
Rémi Verschelde
cd8bd0380d
Merge pull request #92336 from van800/DAP
[DAP] Add `--dap-port` as a command line argument
2024-05-30 22:13:42 +02:00
Ivan Shakhov
77b9e60303 [DAP] Add --dap-port as a command line argument, very similar to --lsp-port 2024-05-30 21:46:37 +02:00
bruvzg
2c9df769ad
Clean Input::frame_parsed_events before de-initialising scripting languages to ensure no script created events exist at the exit. 2024-05-30 13:23:00 +03:00
patwork
2dedf6253b Fix -empty string- console log in web export 2024-05-28 12:32:46 +02:00
Paulo Poiati
a3769c0edc Properly set window class in Wayland 2024-05-22 10:42:12 -03:00
Rémi Verschelde
f58a96cfa2
Merge pull request #92075 from autoit4you/fix-92062
Use `GLOBAL_GET` for `window_{height,width}_override`
2024-05-18 17:41:48 +02:00
Lea
414cc6c89e Use GLOBAL_GET for window_{height,width}_override
Before ProjectSettings::get was used, resulting in ignoring
feature tag overrides for display/window/size/window_width_override
and display/window/size/window_height_override.

Fixes #92062
2024-05-18 11:51:04 +02:00
Raul Santos
e516479889
Release Engine after unregistering GDExtensions
The Engine is used to retrieve singletons, and GDExtensions may try to retrieve a singleton (e.g.: `OS`) in their deinitialization.
2024-05-17 21:29:11 +02:00
Rémi Verschelde
2f1aaca167
Merge pull request #91927 from timothyqiu/monitor-names
Make performance monitor names translatable
2024-05-14 12:07:14 +02:00
Haoyu Qiu
d33e79f299 Make performance monitor names translatable 2024-05-14 10:05:32 +08:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Programneer
efaba30116 Don't define NO_EDITOR_SPLASH in export templates 2024-05-12 13:12:56 +02:00
A Thousand Ships
a0dbdcc3ab
Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
David Snopek
2c5c3ae579 Generate docs from GDExtensions using --gdextension-docs with --doctool 2024-05-07 11:45:17 -05:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Bastiaan Olij
527c30c594 Add support for OpenXR hand interaction extension 2024-05-02 19:15:02 +10:00
RedMser
3047bd4339 Ensure --doctool is run from root directory when implicit cwd is used 2024-05-01 13:36:37 +02:00
kobewi
3ebb5b84a0 Add separate feature tags for editor runtime 2024-04-26 14:44:38 +02:00
Kusok
1e8eff815a Don't ignore audio/driver/output_latency.web 2024-04-25 17:09:45 +08:00
kobewi
12f39befa9 Use minor version in EditorSettings file name 2024-04-19 00:13:06 +02:00
Rémi Verschelde
35369b8d28
Merge pull request #90507 from Calinou/tests-disabled-error-on-test-cli-argument
Exit with an error if using `--test` on binary without unit tests compiled
2024-04-18 12:24:24 +02:00
A Thousand Ships
abe7ec1543
Fix some build errors with disable_3d=yes 2024-04-16 14:25:36 +02:00
Rémi Verschelde
c951421c99
Merge pull request #90268 from RandomShaper/wtp_servers
Use WorkerThreadPool for Server threads (enhanced)
2024-04-15 10:12:00 +02:00
Aaron Franke
6dd4a68797
Reorganize some code to have 2D things grouped together 2024-04-13 02:56:50 -07:00
Hugo Locurcio
7467ce6405
Exit with an error if using --test on binary without unit tests compiled
This makes it clearer that `tests=yes` should be used at compile-time.
Previously, the engine would run as if the argument wasn't passed,
which can be confusing.
2024-04-11 00:07:42 +02:00
Juan Linietsky
65686dedf9 Use WorkerThreadPool for Server threads
* Servers now use WorkerThreadPool for background computation.
* This helps keep the number of threads used fixed at all times.
* It also ensures everything works on HTML5 with threads.
* And makes it easier to support disabling threads for also HTML5.

CommandQueueMT now syncs with the servers via the WorkerThreadPool
yielding mechanism, which makes its classic main sync semaphore
superfluous.

Also, some warnings about calls that kill performance when using
threaded rendering are removed because there's a mechanism that
warns about that in a more general fashion.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2024-04-10 18:47:42 +02:00
Mikael Hermansson
9d01793dff Add --import command-line flag 2024-04-09 15:18:59 +02:00
smix8
a67037635b Remove NavigationServerDummy warnings
Removes NavigationServerDummy warnings.
2024-04-06 03:07:22 +02:00
Samuel Nicholas
93559db3a2
Properly skip printing version header with --no-header
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-03-26 11:41:13 +01:00
Rémi Verschelde
f49efbe0e5
Merge pull request #89229 from akien-mga/main-refactor-os-exit-code
Refactor OS exit code to be `EXIT_SUCCESS` by default
2024-03-24 01:15:06 +01:00
Ricardo Buring
2ed2ccc2d8 Fixed Timestep Interpolation (2D)
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-03-23 12:28:36 +01:00
Rémi Verschelde
453485aede
Merge pull request #89270 from Repiteo/enforce-typename-in-templates
Enforce template syntax `typename` over `class`
2024-03-14 22:34:37 +01:00
Aaron Franke
9e0b38ecd3 Disable XR server when compiling without 3D 2024-03-13 09:02:10 -07:00
Thaddeus Crews
5a6e3cbcb0
SCons: Remove run_in_subprocess dependency 2024-03-11 13:20:09 -05:00
Rémi Verschelde
f040a351c2
Merge pull request #89381 from aaronfranke/disable-3d
Disable all 3D nodes, physics, and resources when compiling without 3D
2024-03-11 14:02:57 +01:00
Rémi Verschelde
0475011c66
Merge pull request #82084 from ogapo/pr/pck-cache-merge
Merge `uid_cache.bin` and `global_script_class_cache.cfg` after mounting PCKs
2024-03-11 14:01:16 +01:00
Aaron Franke
6aac3e4a16 Disable all 3D nodes, physics, and resources when compiling without 3D 2024-03-11 01:00:55 -07:00
Thaddeus Crews
d9fa40f2df
Enforce \n eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
Rémi Verschelde
023dcd44c1
Refactor OS exit code to be EXIT_SUCCESS by default
- `Main::setup` early exits (failure or `--help`/`--version`) now
  consistently return `EXIT_FAILURE` or `EXIT_SUCCESS` on all platforms,
  instead of 255 on some and a Godot Error code on others.
- `Main::start` now returns the exit code, simplifying the handling of early
  failures.
- `Main::iteration` needs to explicit set the exit code in OS if it errors
  out.
- Web and iOS now properly return `OS::get_exit_code()` instead of 0.
2024-03-08 23:31:24 +01:00
Thaddeus Crews
9903e6779b
Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
David Nikdel
5e6adb4a2d Merge uid_cache.bin and global_script_class_cache.cfg after mounting PCKs
fixes godotengine#82061
fixes godotengine#61556

Also, distinguish between main pack and DLC packs.
It's desirable to downloaded content to be as small as possible. This change avoids bloating non-main pack files with new versions of resources that are all read on startup and never used again. They have no effect if loaded after startup.
- project.godot/project.binary file
- extension_list.cfg
- app icon and boot_splash
- .ico and .icns files (these can still be opted in for DLC by listing them explicitly in the include filter)
2024-03-06 12:14:21 -05:00
Rémi Verschelde
e63de52bdb
Check if DisplayServer supports icons before attempting setting it 2024-03-05 14:39:11 +01:00
Thaddeus Crews
0ce9b6fd1d
Add two new COMSTR environment variables 2024-03-01 12:44:03 -06:00
Rémi Verschelde
3a08c646ee
Pre-commit: Update to clang-format 17.0.6 and black 24.2.0 2024-02-28 14:25:35 +01:00
Hugo Locurcio
67e9ccdbc4
Display the build date in the editor and when starting the engine
This can be used to quickly see how recent a development build is,
without having to look up the commit date manually.
When juggling around with various builds (e.g. for benchmarking),
this can also be used to ensure that you're actually running the
binary you intended to run.

The date stored is the date of the Git commit that is built, not
the current date at the time of building the binary. This ensures
binaries can remain reproducible.

The version timestamp can be accessed using the `timestamp` key
of the `Engine.get_version_info()` return value.
2024-02-27 20:39:17 +01:00
A Thousand Ships
f06222e487
[Physics] Fix export with 3D disabled 2024-02-22 16:23:48 +01:00
Anatoli Babenia
e25cfffc7f Add --no-header option to clean output
* Do not print empty line when header is disabled
* Do not print Vulcan header
* Also add "Print header" project setting (default On)
  (suggested by @kaissouDev)
* Add docs for the project setting
  (with suggestions by @Mickeon and @akien-mga)

Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-02-15 14:10:11 +03:00
Hugo Locurcio
67b8d71c79 Disable ReShade in the editor and project manager (if run via Vulkan)
ReShade can still be used on projects run from the editor as well
as exported projects.

This avoids several issues:

- ReShade doesn't play well with low-processor mode, making it hard
  to use unless the Update Continuously editor setting is enabled.
- The ReShade overlay appears on every popup opened, which made popups
  unusable.
- If you use a ReShade configuration that heavily affects the image,
  it won't affect the editor UI which may become unreadable as a result.

This doesn't affect the editor being run via OpenGL or Direct3D 12
as ReShade is injected in a different manner when using those graphics
APIs.
2024-02-14 06:30:20 +01:00
Rémi Verschelde
afc49e52e4
Merge pull request #88130 from AlekseyKapustyanenko/Rotary_Input
Add rotary input support for Android platform
2024-02-13 23:43:33 +01:00
ALEKSEY KAPUSTYANENKO
d5c2a641f0 Add rotary input support. Fix documentation 2024-02-13 21:12:59 +04:00
Rémi Verschelde
c8b5290119
Merge pull request #87013 from bruvzg/intel_angle_with_ids
[Windows] Add support for hex vendor/device IDs in the Angle blocklist. Add Intel Gen5/Gen6/Gen7 GPUs to Angle blocklist.
2024-02-13 17:23:41 +01:00
Rémi Verschelde
62143552f3
Merge pull request #87635 from rune-scape/manage-time-singleton
Manage time singleton in `register_core_types`
2024-02-12 13:34:13 +01:00
rune-scape
c5bcc3ae86 Manage time singleton 2024-02-11 14:39:20 -08:00
A Thousand Ships
684752e75b
Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
Riteo
2677af7794 Handle display driver preferences consistently between editor and projects
The way that it was implemented before allowed for the project property
to spill over to the editor if the `prefer_wayland` property is not
present which, while not completely likely, is still a possibility. This
specific part is thus more of a correctness change, ensuring that we
always enforce the default display server when not running a project.

This commit also removes the restart requirement for the relative
display driver project settings as they're independent and a restart
would do nothing useful.
2024-02-07 16:49:21 +01:00