Commit graph

1613 commits

Author SHA1 Message Date
Rémi Verschelde 96e654335a
Merge pull request #37481 from ThakeeNathees/bind-method-typo
some typo in method binds fixed
2020-04-01 12:57:26 +02:00
Thakee Nathees cb53b1d88e some typo in method binds fixed 2020-04-01 14:01:18 +05:30
Rémi Verschelde f3c74afd28
Merge pull request #37436 from akien-mga/doc-node-renames
doc: Update classref with node renames
2020-03-30 20:32:11 +02:00
Rémi Verschelde eaaee63b62 doc: Update classref with node renames
A few extra renames for classes which were missed in last week's PRs.
2020-03-30 18:23:02 +02:00
Juan Linietsky 89e1263117 Move glow upscale quality to a global setting, for consistency 2020-03-30 10:46:03 -03:00
Rémi Verschelde cd4e46ee65 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.
2020-03-30 09:05:53 +02:00
Rémi Verschelde 3f7fa93179
Merge pull request #37362 from reduz/audioserver-memory-cleanup
Remove the audio memory allocator, use regular one instead.
2020-03-28 15:49:48 +01:00
Rémi Verschelde 60d486acc8 Fix copyright headers for recently added files 2020-03-28 13:29:29 +01:00
Rémi Verschelde 0c320a6bf3 More server renames for consistency after #37361 2020-03-28 13:20:48 +01:00
Juan Linietsky 16245f2c29 Remove the audio memory allocator, use regular one instead. 2020-03-27 20:36:43 -03:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Rémi Verschelde d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Juan Linietsky eaae4b6408 Renamed 2D and 3D nodes to make their types explicit
Fixes #30736.
2020-03-27 14:54:04 +01:00
Martin Liska c554677c95
Fix various -Wmaybe-uninitialized (#37352). 2020-03-27 13:57:20 +01:00
Juan Linietsky c7b4dcae2f Open sub-windows as embedded if the OS does not support them 2020-03-26 15:49:43 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky 9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Yuri Roubinsky 898b843718 Added sky shader mode to visual shaders 2020-03-25 19:04:42 +03:00
Rémi Verschelde 641c85a54f
Merge pull request #37268 from clayjohn/VULKAN-sky-color
Replace subpass textures with color in sky shader
2020-03-24 19:22:55 +01:00
clayjohn 61c67cd5e1 Replace subpass textures with color in sky shader 2020-03-24 10:11:00 -07:00
Rémi Verschelde 9d24541597 Remove unused classes and stray headers
Found by reviewing headers with 1 or less matching includes:
```
find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers
for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes
```
2020-03-24 09:50:51 +01:00
Dominik 'dreamsComeTrue' Jasiński f530c38174 Remove unreferenced & undocumented class Space2D 2020-03-24 01:30:28 +01:00
clayjohn 61a74739ca Working sky shader implementation 2020-03-21 20:43:44 -07:00
Bastiaan Olij c3fee7ba6c Add shader based background mode 2020-03-19 18:30:39 -07:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Ev1lbl0w 380b8039ec
Fix divison by zero issue 2020-03-14 13:08:01 +00:00
Rémi Verschelde 3c376a898a
Merge pull request #36961 from JFonS/fix_mesh_selection
Return correct mesh format for PrimitiveMesh
2020-03-12 12:35:56 +01:00
Rémi Verschelde 98cdf50a55
Merge pull request #36977 from lupoDharkael/decompose-copy
Mesh::convex_decompose: Remove unneeded vector copy
2020-03-11 15:12:15 +01:00
lupoDharkael ee0262977e Loop over faces in create_trimesh_shape() 2020-03-11 00:33:39 +01:00
lupoDharkael 97d1149c3b Mesh::convex_decompose: Remove unneeded vector copy 2020-03-11 00:14:29 +01:00
JFonS 9f2f7ee5eb Return correct mesh format for PrimitiveMesh.
The return value was changed during the Vulkan port, but it didn't include ARRAY_FORMAT_INDEX. This meant they were wrongly considered non-indexed meshes and the click-selection logic for all primitive meshes broke.
2020-03-10 13:08:17 +01:00
qarmin 1f209bfc41 Fixes bugs found by Sonarcloud and Coverity 2020-03-02 19:17:20 +01:00
Juan Linietsky c9cab7ac9f Properly handle EOF when parsing text resource
Fixes #36652
2020-02-28 17:45:33 -03:00
Rémi Verschelde 620030b600
Merge pull request #36640 from reduz/resource-loader-refactor
Removed ResourceInteractiveLoader, add built-in threaded loading.
2020-02-28 17:21:16 +01:00
Juan Linietsky 475e4ea67b Removed interactive loader, added proper thread loading. 2020-02-28 11:20:45 -03:00
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Rémi Verschelde 4f64f3401a
Merge pull request #36388 from AndreaCatania/some_renames
Rename Navigation{Mesh,Polygon}Instance and PlaneShape for clarity
2020-02-28 09:15:38 +01:00
Andrea Catania 483994601d Renamed NavigationPolygonInstance to NavigationRegion2D 2020-02-28 08:28:53 +01:00
Rémi Verschelde b7b3978684
Merge pull request #36556 from RandomShaper/rework_mutex
Reimplement `Mutex` with C++'s `<mutex>` (plus more)
2020-02-28 00:26:01 +01:00
Rémi Verschelde f9d93ee819
Merge pull request #36288 from Calinou/meshlibrary-allow-non-tools-use
Allow using `MeshLibrary.get_item_preview()` in non-editor builds again
2020-02-27 21:10:09 +01:00
Andrea Catania 2e0fb66c6f Renamed PlaneShape to WorldMarginShape 2020-02-27 17:45:16 +01:00
Andrea Catania 3b64ecbc4b Renamed NavigationMeshInstance to NavigationRegion 2020-02-27 17:42:53 +01:00
Pedro J. Estébanez 18fbdbb456 Reimplement Mutex with C++'s <mutex>
Main:
- It's now implemented thanks to `<mutex>`. No more platform-specific implementations.
- `BinaryMutex` (non-recursive) is added, as an alternative for special cases.
- Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes.
- Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts.
- A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this.
- `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`.
- Thread-safe utilities are therefore simpler now.

Misc.:
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
- Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock).
- `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-26 20:40:10 +01:00
Yuri Roubinsky 1e8108310a Changed float type to int for INDEX visual shader input 2020-02-26 16:39:42 +03:00
Yuri Roubinsky 4a3d277623 Add support for integer type in visual shaders 2020-02-26 10:12:06 +03:00
Juan Linietsky 33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
Yuri Roubinsky 3b0638fe1c Changed default capsule axis to vertical
Co-authored-by: Hugo Locurcio <https://hugo.pro>
2020-02-23 23:18:01 +03:00
Rémi Verschelde 2cf6ac6c50 Replace FALLTHROUGH macro by C++17 [[fallthrough]]
This attribute is now part of the standard we target so we no longer
need compiler-specific hacks.

Also enables -Wimplicit-fallthrough for Clang now that we can properly
support it. It's already on by default for GCC's -Wextra.

Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
2020-02-23 00:52:50 +01:00
Rémi Verschelde bf7d6de556
Merge pull request #36441 from YeldhamDev/tabs_unused_constants
Remove unused theme constants in Tab(Container)
2020-02-22 08:17:33 +01:00