Commit Graph

1416 Commits

Author SHA1 Message Date
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
Hugo Locurcio
f7f51bdd7a
Add colors to the command-line help 2024-02-01 23:44:29 +01:00
Riteo
7e0f7d3abd Add Wayland support
Not everything is yet implemented, either for Godot or personal
limitations (I don't have all hardware in the world). A brief list of
the most important issues follows:

- Single-window only: the `DisplayServer` API doesn't expose enough
information for properly creating XDG shell windows.

- Very dumb rendering loop: this is very complicated, just know that
the low consumption mode is forced to 2000 Hz and some clever hacks are
in place to overcome a specific Wayland limitation. This will be
improved to the extent possible both downstream and upstream.

- Features to implement yet: IME, touch input, native file dialog,
drawing tablet (commented out due to a refactor), screen recording.

- Mouse passthrough can't be implement through a poly API, we need a
rect-based one.

- The cursor doesn't yet support fractional scaling.

- Auto scale is rounded up when using fractional scaling as we don't
have a per-window scale query API (basically we need
`DisplayServer::window_get_scale`).

- Building with `x11=no wayland=yes opengl=yes openxr=yes` fails.

This also adds a new project property and editor setting for selecting the
default DisplayServer to start, to allow this backend to start first in
exported projects (X11 is still the default for now). The editor setting
always overrides the project setting.

Special thanks to Drew Devault, toger5, Sebastian Krzyszkowiak, Leandro
Benedet Garcia, Subhransu, Yury Zhuravlev and Mara Huldra.
2024-01-30 16:44:47 +01:00
David Snopek
a8690cbeed Add support for OpenXR local floor extension 2024-01-23 09:19:09 -06:00
Hugo Locurcio
6e5e7b8cb7
Add --log-file command line argument to write output log to a file
This works even if file logging is disabled in the project settings,
or for the editor/project manager.

`--log-file`'s value can be an absolute path or relative to the project
directory (similar to existing arguments like `--write-movie`).
2024-01-19 20:30:04 +01:00
Rémi Verschelde
fa81059b9d
Merge pull request #85939 from adamscott/single-threaded-godot-4
Add `THREADS_ENABLED` macro in order to compile Godot to run on the main thread
2024-01-18 09:33:52 +01:00
Adam Scott
bd70b8e1f6
Add THREADS_ENABLED macro in order to compile Godot to run on the main thread 2024-01-17 13:58:29 -05:00
Rémi Verschelde
0a7579b161
Fix #if *_ENABLED inconsistencies, should check if defined
Co-authored-by: Caroline Joy Bell <halotroop2288@proton.me>
2024-01-17 10:30:15 +01:00
Rémi Verschelde
dc79e956b6
Merge pull request #86587 from RandomShaper/wtp_enhance
Enhance & fix `WorkerThreadPool`
2024-01-11 17:38:09 +01:00
bruvzg
3badb90020 [Windows] Add support for hex vendor/device IDs in the Angle blocklist. Add Intel Gen5/Gen6/Gen7 GPUs to Angle blocklist. 2024-01-09 19:28:45 +02:00
kobewi
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Pedro J. Estébanez
9444d297ed WorkerThreadPool: Overhaul scheduling and synchronization
This commits rewrites the sync logic in a way that the
`use_system_threads_for_low_priority_tasks` setting, which was added due to
the lack of a cross-platform wait-for-multiple-objects functionality, can be
removed (it's as if it was effectively hardcoded to `false`).

With the new implementation, we have the best of both worlds: threads don't
have to poll, plus no bespoke threads are used.

In addition, regarding deadlock prevention, since not every possible case of
wait-deadlock could be avoided, this commits removes the current best-effort
avoidance mechanisms and keeps only a simple, pessimistic way of detection.

It turns out that the only current user of deadlock prevention, ResourceLoader,
works fine with it and so every possible situation in resource loading is now
properly handled, with no possibilities of deadlocking. There's a comment in
the code with further details.

Lastly, a potential for load tasks never being awaited/disposed is cleared.
2024-01-08 12:45:42 +01:00
Hugo Locurcio
6da4d5bd60
Suggest --headless CLI argument in DisplayServer not found error message
This is helpful for newcomers setting up Godot on CI, as this provides
automatic guidance as for why it doesn't run out of the box if
there's no X11 server available.
2023-12-21 23:42:39 +01:00
Yuri Sizov
3a8524dd92
Merge pull request #83452 from RandomShaper/rd_common
Split `RenderingDevice` into API-agnostic and `RenderingDeviceDriver` parts
2023-12-20 20:09:18 +01:00
Pedro J. Estébanez
12a519bae2 Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-12-20 19:18:08 +01:00
bruvzg
e01b22a69d
[Windows] Make Windows Ink tablet API default, add dummy driver to disable tablet input. 2023-12-18 22:36:54 +02:00
Rémi Verschelde
41365c6c8b
Merge pull request #70315 from RandomShaper/d3d12_mesa
Direct3D 12 Rendering Driver (Mesa NIR approach)
2023-12-12 21:58:57 +01:00
Pedro J. Estébanez
2f47c57385 Add Direct3D 12 RenderingDevice implementation 2023-12-12 19:10:04 +01:00
Rémi Verschelde
748113280f
Merge pull request #85273 from bruvzg/amd_ban
Force ANGLE on all pre GCN 4th gen. AMD/ATI GPUs.
2023-12-12 10:39:52 +01:00
Yuri Sizov
07677f0f51 Merge pull request #85885 from YuriSizov/bench-pressing
Improve engine startup/shutdown benchmarks
2023-12-08 17:12:26 +01:00
Yuri Sizov
9dce1a45a0 Merge pull request #85819 from Malcolmnixon/export-android-build-template
Add option to install android build template for export
2023-12-08 16:58:54 +01:00
Malcolm Nixon
988c1bf298 Add option to install android build template for export
This PR adds a new "--install-android-build-template" command-line option which causes the android build template to be installed before exporting the project.
2023-12-08 09:00:25 -05:00
Yuri Sizov
d7cca8162d Improve logging and benchmarking in Main 2023-12-08 12:53:04 +01:00
Yuri Sizov
fc3f40f37d Improve engine startup/shutdown benchmarks
- Add contexts to give a better sense of benchmarked areas.
- Add missing benchmarks and adjust some begin/end points.
- Clean up names.
- Improve Android's internal benchmarks in a similar manner.

Co-authored-by: Fredia Huya-Kouadio <fhuya@meta.com>
2023-12-08 12:53:04 +01:00
Rémi Verschelde
cff4af018f
CI: Add 4.2-stable.expected file for GDExtension compatibility checks 2023-12-07 09:36:54 +01:00
bruvzg
d48524a3f4
[macOS] Switch ANGLE backend to ANGLE over OpenGL, switch default compatibility renderer back to native. 2023-12-05 15:39:40 +02:00
bruvzg
54747fab72
Force ANGLE on all pre GCN 4th gen. AMD/ATI GPUs. 2023-11-23 19:15:25 +02:00
Yuri Sizov
bc1949d797 Correctly check scripts that must inherit EditorPlugin
Also updates some error messages related to this kind of check
across the codebase.
2023-11-23 16:24:43 +01:00
bruvzg
cf56b881eb
[macOS] Cleanup default GL driver setting. 2023-11-15 10:07:16 +02:00
Hugo Locurcio
a63556212d
Don't apply frame delay project setting to the editor
This appears to already be the case for the Max FPS project setting.
2023-11-12 12:09:39 +01:00
bruvzg
173b84127b
[Windows] Add some AMD GPUs to the OpenGL blocklist. 2023-11-09 20:11:04 +02:00
bruvzg
f3d4f5a77e
[X11] Add fallback from desktop GL to GLES, suppress PRIME detector error spam. 2023-11-06 12:40:44 +02:00
Yuri Sizov
b733901e9e Merge pull request #84354 from RandomShaper/gdext_no_cache_doc
Polish & fix editor help cache generation
2023-11-02 20:34:22 +01:00
Pedro J. Estébanez
a1d8fc1af9 Polish & fix editor help cache generation
- Isolated the generation of extensions's docs. They're now not cached and refreshed as needed.
- Removed superfluous sorting of the class list.
- Removed some superfluous/unused elements.
- Renamed some items for clarity.
2023-11-02 13:46:37 +01:00
Rémi Verschelde
799d30c306
Merge pull request #83753 from bruvzg/mac_angle_fb
[macOS] Fallback to native OpenGL renderer if ANGLE initialization failed.
2023-10-31 20:14:42 +01:00
bruvzg
f8829c80bb
Fix missing initial position modes for the main window. 2023-10-23 09:56:59 +03:00
bruvzg
590c353707
[macOS] Fallback to native OpenGL renderer if ANGLE initialization failed. Remove platform specific renderer config values from docs. 2023-10-21 22:09:35 +03:00
Daylily-Zeleen
fee3b85a2b Fix missing editor singletons when dump extension api 2023-10-13 14:36:51 +08:00
Rémi Verschelde
4b7cc99bc1
Merge pull request #79169 from reduz/debug-canvas-item-redraw
Debug CanvasItem redraw
2023-10-11 08:40:05 +02:00
Rémi Verschelde
1fe7f8a96c
Merge pull request #82893 from m4gr3d/godot_android_lib_improvements
Cleanups and improvements to the Godot Android library api
2023-10-10 09:11:53 +02:00
Fredia Huya-Kouadio
2951c162ed Cleanups and improvements to the Godot Android library api:
- Provide api to retrieve the running Godot instance from a GodotHost
- Provide api for the GodotHost to register runtime GodotPlugin instances
- Hide the GodotService class until it's completed
- Include project setting to enable long press for Android devices
- Include project setting to enable pan and scale gestures on Android devices
2023-10-08 05:30:38 -07:00
Jack Wilsdon
22b00e392e Fix building without GDScript
Fixes #82231
2023-10-08 01:29:04 +01:00
Rémi Verschelde
d7bca20359
Merge pull request #82722 from BastiaanOlij/openxr_fix_hand_tracking_issues
OpenXR: Fix small hand tracking issues
2023-10-04 15:43:18 +02:00
bruvzg
af00c4a54a
[X11] Add support for using EGL/GLES instead of GLX. 2023-10-04 14:15:36 +03:00
Bastiaan Olij
c60ef33175 OpenXR Fix small hand tracking issues 2023-10-04 13:18:31 +11:00
Rémi Verschelde
3a5d524287
Merge pull request #82614 from m4gr3d/openxr_eye_gaze_interaction
Add support for the OpenXR Eye gaze interaction extension
2023-10-03 17:25:52 +02:00
bruvzg
ac3fc2a8a1
[ANGLE] Add fallback control options and defaults.
[macOS] Use ANGLE by default if engine is built with statically linked ANGLE.
[Windows] Add option enable/disable fallback to ANGLE and option force specific GPU to always use ANGLE.
2023-10-03 16:23:43 +03:00
Bastiaan Olij
9e56e7a3ce Add support for the OpenXR Eye gaze interaction extension
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2023-10-02 14:02:23 -07:00
Rémi Verschelde
251fb83d53
Merge pull request #82331 from rburing/gdextension_dump_docs
Optionally include documentation in GDExtension API dump
2023-09-26 22:46:34 +02:00
Ricardo Buring
8ee04c5f87 Optionally include documentation in GDExtension API dump 2023-09-26 21:39:24 +02:00
Rémi Verschelde
da91cf9367
Merge pull request #82347 from SaracenOne/dir_access_checks
Add error checks for DirAccess creation
2023-09-26 16:36:47 +02:00
Rémi Verschelde
cdbc2fdaa6
Merge pull request #81608 from timothyqiu/fullscreen-editor
Make editor support `--fullscreen` command-line argument
2023-09-26 08:20:54 +02:00
Rémi Verschelde
7dccb9e039
Merge pull request #80796 from smix8/navgenerator_2d_4.x
Add 2D navigation mesh baking
2023-09-26 08:17:58 +02:00
Rémi Verschelde
55dfbd7761
Merge pull request #80284 from dsnopek/gdextension-hot-reload
Implement reloading of GDExtensions
2023-09-26 08:17:28 +02:00
David Snopek
2733a6f762 Implement reloading of GDExtensions 2023-09-25 22:10:17 -05:00
Saracen
3f4513d4de Add error checks for DirAccess creation. 2023-09-26 03:07:43 +01:00
smix8
0ee7e3102b Add 2D navigation mesh baking
Adds 2D navigation mesh baking.
2023-09-25 19:48:14 +02:00
Bastiaan Olij
d7d334158a Implement OpenXR Foveated rendering support 2023-09-25 17:12:20 +10:00
Rémi Verschelde
2e109b1598
Merge pull request #82008 from KoTeYkA23/render-selector-restart-fix
Make all render driver project settings require restart
2023-09-24 23:32:55 +02:00
Álex Román Núñez
10697adb8a Fix --gdscript-docs tool failing when autoloads are used in the project.
Fixes #79497
2023-09-22 14:42:31 +02:00
CaTaTo
7fab7eb7d8 Make all render driver project settings require restart
Update main/main.cpp

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>

Update main/main.cpp

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-09-21 17:01:54 +03:00
bruvzg
1887a9df19
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
ryanabx
a5b7c4c415 Add --lsp-port as a command line argument 2023-09-18 08:51:15 -05:00
Haoyu Qiu
cf906ebc9b Make editor support --fullscreen command-line argument 2023-09-13 16:19:11 +08:00
Bastiaan Olij
3806d964e3 Fix issue with OpenXR environment blend mode not being applied properly 2023-09-13 14:07:23 +10:00
A Thousand Ships
a29416e332 [Scene,Main] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-12 12:53:06 +02:00
Rémi Verschelde
8de6405288
UWP: Remove platform port, needs to be redone from scratch for 4.x
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.

So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
2023-09-07 15:01:59 +02:00
Yuri Sizov
4328ffcc79 Fix ThemeDB initialization in tests
Also fixes class name shadowing in Viewport/Window tests.
2023-09-04 18:07:16 +02:00
Juan Linietsky
407b16ab00
Debug CanvasItem redraw
I wanted to add this tool for years and always forget. This command line option:

```
$ godot.exe -e --debug-canvas-item-redraw
```

Allows to see when a canvas item is redrawn. This helps find out if something
in the UI is refreshing in a way it should not. Examples as such:

* Signals causing more of the UI to redraw.
* Container resizing causes more UI elements to redraw.
* Something using a timer is redrawing all time time, which can go unnoticed.

To my surprise, the editor UI is redrawing very efficiently. There is some
weird stuff with the scene tabs, redrawing when the inspector changes but most
things for the most part are fine.
2023-08-28 12:53:56 +02:00
Hugo Locurcio
6f1152bdbe
Add a --audio-output-latency command-line argument
This allows optimizing the audio output latency on higher-end CPUs,
especially in projects that do not expose a way to override this setting.
2023-08-17 14:45:17 +02:00
Rémi Verschelde
d603040d4d
Merge pull request #78012 from Calinou/cli-add-max-fps-argument
Add a `--max-fps` command-line argument to set a FPS limit
2023-08-17 12:27:27 +02:00
Rémi Verschelde
1e3b1a7137
Merge pull request #80188 from vnen/gdextension-copy-dll
GDExtension: Copy DLL to a temp file before opening
2023-08-16 16:55:19 +02:00
sakrel
80a36ff985 Add support for GLSL source-level debugging with RenderDoc (--generate-spirv-debug-info) 2023-08-12 14:56:49 +02:00
George Marques
cff69b0612
GDExtension: Copy DLL to a temp file before opening
This is done only in the editor and only on Windows, to avoid a file
lock that prevents the original library being updated (e.g. by a
compiler).

When the game runs it will load the original DLL and pick up any
changes, only the editor will stay with the copy (until it is restarted
and create a new copy).

The copy is done in place by prepending a `~` to the original file name,
so dependencies that are loaded with a relative file path still work.
When the library is unloaded the copy file is deleted. The copy is also
marked as hidden to not show up in explorer.
2023-08-11 10:44:23 -03:00
Rémi Verschelde
33198d0df0
Merge pull request #75784 from Riteo/int-scale
Add content scale stretch modes, implement integer scaling
2023-08-11 10:32:11 +02:00
Riteo
87cfc415a3 Add content scale stretch modes, implement integer scaling
Integer scaling is achieved (after aspect expansion) by "lying" to the
stretching code about the window's size, telling it that it's always an
integer multiple of the viewport so that it only gets stretched to an
integer factor.

This approach works with all stretch and aspect modes and doesn't
require handling for each, only requiring to "loosen up" some
self-excluding conditions (in other words, replacing some `else if`s
with just `if`s) regarding viewport offset and margin calculation (black
bars).

Includes a tiny usability change that adds a range hint for the content
scale factor between 0.5 to 8.0.

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-08-10 19:45:47 +02:00
smix8
744fa87da2 Move navigation mesh baking to NavigationServer
Moves navigation mesh baking to NavigationServer.
2023-08-03 19:49:07 +02:00
Rémi Verschelde
7ada24c985
Merge pull request #75198 from Bestest-Coder/master
Added --gpu-index to `forwardable_cli_arguments`
2023-08-03 14:46:22 +02:00
Bestest-Coder
5592643c57 Added --gpu-index to forwardable_cli_arguments
when the gpu index is specified through the CLI, that setting will
be inherited by both the editor (if started through project manager)
and instances of the game started through the editor

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-08-02 10:41:29 -04:00
Hugo Locurcio
4cab77094a
Add a --max-fps command-line argument to set a FPS limit
This allows limiting framerate on any project, which is useful to
reduce power usage and latency with certain setups (such as VRR displays).

This is particularly useful in projects that do not expose a setting to change
the FPS limit. While external FPS limiters can be used, they can be cumbersome
to set up and result in increased input lag compared to a built-in FPS limiter.
2023-07-28 02:51:27 +02:00
kobewi
5ee6d33d49 Don't use splash minimum display time in editor 2023-07-12 21:09:30 +02:00
Yuri Sizov
95da8e1394 Merge pull request #70771 from kleonc/main-loop-set-after-resolved
Ensure `MainLoop` and its custom script is set right after it's resolved
2023-07-12 17:15:59 +02:00
Yuri Sizov
008f32cd60 Merge pull request #78045 from rburing/main_loop_command
Add command-line option to run a `MainLoop` by its global class name
2023-07-12 15:08:50 +02:00
bruvzg
75d0fcea16
[macOS/iOS] Set MoltenVK logging level based on --verbose flag. 2023-07-05 15:40:33 +03:00
RedworkDE
e0f644a48d C#: Fix editor integration breaking and causing error spam when reloading assemblies fails
- Do not reload scripts from non-collectible assemblies
- Do not load GodotTools as collectible
- Do not attempt to reload the same project assembly forever
2023-06-21 12:47:52 +02:00
smix8
f1d8ddd9bd Remove SceneTree debug avoidance hint
Removes SceneTree debug avoidance hint.
2023-06-16 17:18:47 +02:00
Rémi Verschelde
6fb391bc23
Fix various typos with codespell
And ignore some false positives introduced by recent versions of codespell.
2023-06-16 08:45:35 +02:00
Rémi Verschelde
56ac32feab
Merge pull request #78054 from bruvzg/fix_res_errors
Fix "Resource file not found" error on editor start.
2023-06-14 09:24:45 +02:00
Hugo Locurcio
061397835d
Document known bugs with the Multi-Threaded thread model project setting
- Add a warning on project startup when using the Multi-Threaded option.
- Improve command line validation for the `--render-thread` CLI argument.
2023-06-14 08:37:04 +02:00
Ricardo Buring
de5b48ead3 Add command-line option to run a MainLoop by its global class name 2023-06-13 17:43:17 +02:00
Álex Román Núñez
938a837056 Disable NVIDIA's threaded optimization on Windows 2023-06-13 11:47:40 +02:00
bruvzg
6eaff227ec
Fix "Resource file not found" error on editor start. 2023-06-09 19:04:50 +03:00
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