Commit graph

848 commits

Author SHA1 Message Date
reduz e93b2242c2 Reorganize rendering server.
-Made RenderingServerScene abstract, allowing reimplementation
-RenderingServerRaster -> RenderingServerDefault, but this class is going away soon.
2020-12-03 19:01:01 -03:00
Thakee Nathees 42bfa16996 Refactor DocData into core and editor (DocTools) parts 2020-12-02 00:48:39 +05:30
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 493da99269
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer. 2020-11-26 13:55:26 +02:00
Rémi Verschelde 2ca1c17a5c
Merge pull request #43661 from EricEzaM/PR/INP2-rename_load_from_globals
load_from_globals() -> load_from_project_settings()
2020-11-19 07:40:21 +01:00
Eric M e5376fb129 load_from_globals() -> load_from_project_settings() 2020-11-19 09:21:21 +10:00
Jordan Schidlowsky e9527d0353 allow vulkan validation layers in release builds if explicity asked for 2020-11-18 14:07:28 -06:00
Fabio Alessandrelli 032a1c5dc3 Fix CLI export when export_path is in preset.
Export presets contains the export_path option, to specify the default
export location, but the CLI export option disregarded that, and always
required and export path to be specified.
After this commit, if the export path is not specified in the command,
the one in the preset will be used, erroring only if it's not present or
invalid.
2020-11-17 18:26:03 +01:00
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Rémi Verschelde d7176e9040
Merge pull request #42167 from madmiraal/fix-42108
Remove the unnecessary sync() and the restrictions it imposes on 3D Physics.
2020-11-16 09:32:48 +01:00
Rémi Verschelde 5d89b1ad43
Merge pull request #43369 from Calinou/allow-svg-project-icon
Allow using SVG images as project icon
2020-11-10 09:37:18 +01:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Hugo Locurcio 0f9432f060
Allow using SVG images as project icon
Since exporters will save their own icon, the target platforms
don't have to support SVG to display the icon correctly.

This closes #23068.
2020-11-06 23:09:44 +01:00
reduz f2397809a8 Refactored Variant Operators.
-Using classes to call and a table
-For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
2020-11-06 12:45:50 -03:00
reduz 0e6664539d Refactor pixel snapping.
-Rename pixel_snap to snap_2d_to_vertices
-Added snap_2d_to_transforms which is more useful

Fixes #41814
Solves proposal https://github.com/godotengine/godot-proposals/issues/1666
Supersedes #35606, supersedes #41535, supersedes #41534
2020-10-30 08:57:32 -03:00
Rémi Verschelde 2eaedcf14e
Merge pull request #42361 from akien-mga/vulkan-layers-opt-in
Vulkan: Make validation layers optional
2020-10-28 21:43:22 +01:00
Rémi Verschelde 4960894880
Update AUTHORS and DONORS list
New corporate sponsors:
  Spiffcode (Platinum)
  ASIFA-Hollywood (Silver)
  Zenva Academy (Silver)

Thanks to all contributors and donors for making Godot possible!
2020-10-28 14:06:22 +01:00
Rémi Verschelde 54e6338c9b
Vulkan: Make validation layers optional
They're now disabled by default, and can be enabled with the command line
argument `--vk-layers`.

When enabled, the errors about them being missing are now warnings, as
users were confused and thought this meant Vulkan is broken for them.

Fix crash in `~VulkanContext` when validation layers are disabled (exposed by
this PR since before they could not be disabled without source modification).

Also moved VulkanContext member initializations to header.

Fixes #37102.
2020-10-27 16:19:15 +01:00
reduz ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00
Sergey Minakov 1d9b6b01db iOS: move touch delay to settings 2020-10-01 12:36:11 +03:00
Rémi Verschelde 819c3524a5
OS: Remove unused get_splash_tick_msec
It was added in 3e20391bf6 but it doesn't seem
particularly useful, and it was only implemented for the custom splash branch
and not the default one, so it could return an uninitialized int.
2020-09-24 15:40:30 +02:00
Fabio Alessandrelli f3c6ac1d71 Ignore thread models when compiling with NO_THREAD
The thread model option for physics (2D) and rendering (single-unsafe,
single-safe, multithread), was causing crashes/locks when set as
multithreaded and exported for a platform that does not support threads
(namely HTML5).

This commit ensures that when threads support is not available, that
option is ignored, and the equivalent of "single-unsafe" is always used
instead.
2020-09-23 11:24:01 +02:00
Marcel Admiraal 41209efa7f Remove the unnecessary sync() and the restrictions it imposes on 3D Physics. 2020-09-18 10:43:31 +01:00
Rémi Verschelde 92d1964d1a
Donors: Add Gamblify, remove Interblock from splash screen 2020-09-16 16:10:35 +02:00
Marcel Admiraal e3d698dae9 Remove unused Python imports. 2020-09-10 11:38:52 +01:00
Rémi Verschelde a77106bf7e
Merge pull request #41332 from bruvzg/win_subsys_option
Revert #41164, add subsystem build option.
2020-09-03 11:52:29 +02:00
Rémi Verschelde 358e209fa0
Merge pull request #41190 from Xrayez/main-loop-type-class
Accept global classes  for `MainLoop` type in project settings
2020-09-02 11:52:56 +02:00
Marcel Admiraal 5f092cf7bb Fix new black style check failures in various files. 2020-08-21 16:51:30 +01:00
bruvzg 03ffd6451a
Revert "[Windows] Attach to parent console instead of creating new one."
This reverts commit 4f7a49db53.
2020-08-17 19:05:48 +03:00
Andrii Doroshenko (Xrayez) 6f426c3360 Port ClassDB tests to use doctest
Extracted the most minimal core initialization functionality from
`setup()` and `setup2()` so that `ClassDB` could be tested properly
(input, audio, rendering, physics etc, are excluded).

Display and rendering servers/singletons are not initialized at all.

Due to the fact that most subsystems are disabled, fixed various crashes in the
process (in order):
- `AcceptDialog` OK/cancel swap behavior (used `DisplayServer` while
  `register_scene_types()`);
- `make_default_theme` which depends on `RenderingServer`;
- `XRServer` singleton access while calling `register_modules_types()`;
- hidden bug in a way joypads are cleaned up (MacOS and Linux only).

Removed manual `ClassDB` init/cleanup calls from `test_validate_testing.h`.

ClassDB tests:

Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2020-08-16 16:41:02 +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
Andrii Doroshenko (Xrayez) 871b1d76d2 Accept global classes for MainLoop type in project settings
`application/run/main_loop_type` setting can handle custom global
classes (`class_name`).  For instance: `MySceneTree`.

The setting's default is changed from empty to `SceneTree` as to give
some hint of what kind of input is accepted for the main loop type.
2020-08-11 20:20:30 +03:00
Rémi Verschelde 0e751ea7c3
Merge pull request #41164 from bruvzg/win_attach_console
[Windows] Attach to parent console instead of creating new one.
2020-08-11 12:58:12 +02:00
bruvzg 4f7a49db53
[Windows] Attach to parent console instead of creating new one. 2020-08-11 13:02:50 +03:00
Andrii Doroshenko (Xrayez) 6a495f4d04 Properly detect --test command-line argument
Do not prematurely parse anything which beings with `--test`
to run doctest. This allows other commands to be run, such as
`--test-gdscript` or other custom arguments.
2020-08-08 21:54:23 +03:00
Andrii Doroshenko (Xrayez) 63720648e8 Cleanup obsolete tests from displaying in help 2020-07-29 15:07:16 +03:00
Aaron Franke 56e2c6c704
Make all String float conversion methods be 64-bit 2020-07-27 18:38:53 -04:00
Andrii Doroshenko (Xrayez) d86de6c98e SCons: Refactor running commands through builders
A new `env.Run` method is added which allows to control the verbosity
of builders output automatically depending on whether the "verbose"
option is set. It also allows to optionally run any SCons commands in a
subprocess using the existing `run_in_subprocess` method, unifying
the interface. `Action` objects wrap all builder functions to include a
short build message associated with any action.

Notably, this removes quite verbose output generated by `make_doc_header`
and `make_editor_icons_action` builders.
2020-07-28 00:09:21 +03:00
Rémi Verschelde a3a980eb0d SCons: Build tests/ and main/ in cloned environments
Allows switching `tests=yes`/`no` and rebuilding only tests and main,
instead of the whole engine.

Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>
2020-07-26 16:03:11 +02:00
Andrii Doroshenko (Xrayez) 9f649efe5d Move tests to the top-level directory 2020-07-26 00:06:07 +03:00
Rémi Verschelde 6f292f906e
Merge pull request #38900 from bruvzg/docs_ignore_os_spec_def_vals
Docs: Ignore OS specific values (constants, project settings, properties)
2020-07-25 18:54:25 +02:00
Andrii Doroshenko (Xrayez) f6465f46b4 SCons: Add tests option to enable or disable unit tests 2020-07-25 18:44:18 +03:00
Gordon MacPherson a55b10a053 fix crash on shutdown 2020-07-24 14:48:14 +01:00
Gordon MacPherson 2bdbdc4702 Fix arguments always being found and returned some items back to normal 2020-07-24 14:16:02 +01:00
RevoluPowered 579342810f t Add unit testing to Godot using DocTest and added to GitHub Actions CI
Implements exit codes into the engine so tests can return their statuses.
Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically.

Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header.

This lowers the complexity of running the unit tests and even for
physics should be possible to implement such a fix.
2020-07-24 13:05:33 +01:00
George Marques 5d6e853806
New GDScript tokenizer and parser
Sometimes to fix something you have to break it first.

This get GDScript mostly working with the new tokenizer and parser but
a lot of things isn't working yet. It compiles and it's usable, and that
should be enough for now.

Don't worry: other huge commits will come after this.
2020-07-20 11:38:39 -03:00
bruvzg 0181c3dde1
Docs: Ignore OS specific values (constants, project settings, properties). 2020-07-15 12:24:59 +03:00
Hugo Locurcio b89dc6ae00 Disable file logging for the project manager
Due to `user://` returning the current working directory when no
project is open, this caused logs to be written to `$HOME`
most of the time.

This closes #40305.
2020-07-14 12:42:51 +02:00
Rémi Verschelde 28e8347d6c
Merge pull request #40354 from bruvzg/add_vulkan_init_message
Display error popup instead of crashing if Vulkan init failed.
2020-07-14 09:03:25 +02:00