Commit graph

1007 commits

Author SHA1 Message Date
Juan Linietsky
4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Waridley
ff1fbd2bc5 Fix volume interpolation in positional audio nodes
Fixes #22016
2020-03-25 02:37:35 -05:00
Andrea Catania
277696d6c5 Fixed IK rotation issue 2020-03-24 10:06:24 +01:00
Rémi Verschelde
87404bda8a
Merge pull request #37169 from AndreaCatania/AndreaCatania-patch-2
Fixes navigation path reset
2020-03-20 09:34:53 +01:00
Andrea Catania
c7cf624836 Fixes navigation path reset 2020-03-19 18:05:31 +01:00
Tomasz Chabora
2ccd1a7805 Fix visibility enabler flag toggling 2020-03-17 17:46:18 +01: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
lupoDharkael
d63bf6dea5 Complete NavigationMeshInstance rename 2020-03-08 17:33:34 +01:00
Bastiaan Olij
0ca1711681 ARVRController.is_button_pressed requires to return a boolean 2020-03-07 12:22:18 +11:00
Pierre Caye
ad227d9a85 Add a new configuration warning to CollisionShape
In the case where a ConcavePolygonShape is used as a shape for a RigidBody
in another mode than static, a configuration warning will appear in the
editor.
2020-03-05 11:18:45 +01: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
09a6a2d8f8 Signals: Port more uses of connect_compat
Those were problematic as they call a method of their parent class,
but callable_mp does not allow that unless it's public.

To solve it, we declare a local class that calls the parent class'
method, which now needs to be protected to be accessible in the
derived class.
2020-02-28 14:24:09 +01: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
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
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
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
Juan Linietsky
3c0059650d Added StringName as a variant type.
Also changed all relevant properties defined manually to StringName.
2020-02-21 14:25:29 +01:00
Juan Linietsky
9a34f39d32 Add support for named binds in Skin.
Helps better reutilization of skeletons from Maya exported files.
2020-02-21 09:40:29 -03:00
Juan Linietsky
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Rémi Verschelde
49fec646cb Fix compilation warnings and re-enable werror=yes on Travis
Fix -Wunused-variable, -Wunused-but-set-variable and -Wswitch warnings
raised by GCC 8 and 9.

Fix -Wunused-function, -Wunused-private-field and
-Wtautological-constant-out-of-range-compare raised by Clang.

Fix MSVC 2019 warning C4804 (unsafe use of type 'bool' in comparison
operation).

GCC -Wcpp warnings/Clang -W#warnings (`#warning`) are no longer raising
errors and will thus not abort compilation with `werror=yes`.

Treat glslang headers are system headers to avoid raising warnings.

Re-enables us to build with `werror=yes` on Linux and macOS, thus
catching warnings that would be introduced by new code.

Fixes #36132.
2020-02-18 20:51:25 +01:00
Andrea Catania
79fc7d7d6a Added utility functions to the new NavigationServer:
- Vector3 get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, const bool &p_use_collision = false);
- Vector3 get_closest_point(const Vector3 &p_point);
- Vector3 get_closest_point_normal(const Vector3 &p_point);
- Object *get_closest_point_owner(const Vector3 &p_point);
2020-02-18 17:12:45 +01:00
Juan Linietsky
3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
WARIO-MDMA
61d20b1f56 Reduce AudioStreamPlayer's pitch_scale max value 2020-02-15 22:26:08 +11:00
Rémi Verschelde
d2537407ef Fix various GCC compilation warnings after Vulkan merge
Part of #36132.
2020-02-14 10:02:31 +01:00
Rémi Verschelde
54ac8eaba6 Remove more deprecated methods and code 2020-02-13 12:37:45 +01:00
Rémi Verschelde
c48237967a
Merge pull request #36145 from akien-mga/remove-deprecated-friction-bounce
Remove deprecated PhysicsBody friction and bounce parameters
2020-02-12 21:49:38 +01:00
Juan Linietsky
cf8c679a23 ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits. 2020-02-12 14:24:54 -03:00
Rémi Verschelde
1206bdb71b Remove deprecated PhysicsBody friction and bounce parameters
They were replaced in 3.1 by PhysicsMaterial properties via #12403.
2020-02-12 13:39:55 +01:00
Rémi Verschelde
0e3d625737 doc: Sync classref with current source
Lots of internal API changes and some docstrings were lost in the conversion.
I manually salvaged many of them but for all the rendering-related ones, an
additional pass is needed.

Added missing enum bindings in BaseMaterial3D and VisualServer.
2020-02-12 12:37:13 +01:00
Rémi Verschelde
db81928e08 Vulkan: Move thirdparty code out of drivers, style fixes
- `vk_enum_string_helper.h` is a generated file taken from the SDK
  (Vulkan-ValidationLayers).
- `vk_mem_alloc.h` is a library from GPUOpen:
  https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2020-02-11 14:08:44 +01:00
Juan Linietsky
f14defb6f9 WIP CameraEffects implementation (bokeh not working for now) 2020-02-11 12:15:03 +01:00
Rémi Verschelde
fff4240bb4 Fix code formatting issues and VS compilation
Also temporarily disable multicheck build so that we get a full build
even when there are style issues on Vulkan.

Fixes #33356.
2020-02-11 12:05:19 +01:00
Juan Linietsky
b509c814fc Improved Voxel AO settings. 2020-02-11 12:05:05 +01:00
Juan Linietsky
f4c5e88ef2 Fix to category in material. 2020-02-11 12:05:04 +01:00
Juan Linietsky
da0457fa29 Several fixes to GIProbes 2020-02-11 12:04:56 +01:00
Juan Linietsky
f4948721e4 Fixed uninitialized memory bug in voxelizer 2020-02-11 12:04:54 +01:00
Pedro J. Estébanez
19e294e29b Fix export template compilation 2020-02-11 12:04:31 +01:00
Juan Linietsky
2c67cc654f AO support for GIProbe (right on time for Godot Sprint!) 2020-02-11 12:03:55 +01:00
Juan Linietsky
76c6f39d99 GIProbe now generates a distance field on bake using CPU, for better compatibility 2020-02-11 12:03:54 +01:00
Juan Linietsky
561b431d85 Dynamic object support for GI Probes (a bit buggy still) 2020-02-11 12:03:52 +01:00
Juan Linietsky
a95fb114ba Fixed 2D and 3D CPU Particles 2020-02-11 12:03:50 +01:00
Juan Linietsky
6ee2f5e6b6 More GIProbe work and fixes 2020-02-11 12:03:49 +01:00
Juan Linietsky
acf0f6c8a7 GIProbes working. 2020-02-11 12:03:20 +01:00
Juan Linietsky
263bebe023 Untested support for compute shaders 2020-02-11 12:02:34 +01:00