Commit graph

4171 commits

Author SHA1 Message Date
Bastiaan Olij
717f3227ec ARVR GDNative enhancements:
- add set_interface function
- add access to depth buffer
- add supplying a depth buffer from an ARVR plugin
2021-03-25 22:37:47 +11:00
Rémi Verschelde
a0f56b5459
Mono: Fix Android build after #46900
(cherry picked from commit 2274d4eebc)
2021-03-18 17:58:49 +01:00
Ilya Kuznetsov
cacf96962d
Added mono_unhandled_exception call to unhandled_exception hook
(cherry picked from commit 6061ff7ba1)
2021-03-17 15:17:02 +01:00
Rémi Verschelde
33628c482f
miniupnpc: Update to version 2.2.2
(cherry picked from commit 69486b1059)
2021-03-17 15:16:59 +01:00
Rémi Verschelde
e6b291b152
Mono: Bump Godot.NET.Sdk to 3.3.0
Using only 3.3 results in a build warning.

Follow-up to #47055.
2021-03-17 14:46:26 +01:00
Rémi Verschelde
0341251d0f
Bump version to 3.3-rc
We decided to rename the upcoming 3.2.4 release to 3.3 to better reflect that
it is a significant feature release, and not a maintenance update.

The `3.2` branch was also renamed to `3.x` and will now be the development
branch for future 3.x releases (3.3, 3.4, etc.).
2021-03-16 12:16:36 +01:00
Hugo Locurcio
ee8661158c
Document the valid input range for acos() and atan()
(cherry picked from commit d359e159da)
2021-03-16 11:37:26 +01:00
Haoyu Qiu
871843bbdc Fix uninitialized GridMapEditor::node 2021-03-16 10:20:56 +08:00
Fabio Alessandrelli
50f0f51604 [Net] Fix miniupnpc when no interface is specified
This is a tricky one, it used to work, but it was wrong, because in such
a scenario instead of passing NULL as required by the API, it would pass
a buffer containing the `\0` terminator.
This stopped working on a specific miniupnpc version, when they fixed
some network endianess issue on Windows, to which we made a workaround,
which in turn would probably result in failures when the interface is
specified.

This commit address the issue properly, by checking the specified
interface string size, and correctly passing NULL instead of the empty
string when necessary.

Also reverts the commit that introduced the bogus workaround:
388adac947

One of those PR when the explanation is much longer then code changes
:).
2021-03-15 18:12:05 +01:00
Ev1lbl0w
a586f9daae
Replace malloc's with Godot's memalloc macro
(cherry picked from commit 838e7d0a8d)
2021-03-13 22:01:27 +01:00
Ignacio Etcheverry
10c8438178
C#: Fix StringName leak warnings after generating bindings
`Main::cleanup()` prints warnings if it finds `StringName`s still alive.
We need the `BindingsGenerator` to be destructed before calling cleanup.

(cherry picked from commit d9603b2d73)
2021-03-13 21:56:31 +01:00
jfons
ab3b7a57f2 Fix visibility toggle for baked GridMaps
(cherry picked from commit 809d88b925)
2021-03-12 13:26:10 +01:00
Rémi Verschelde
3f246ebeed
Merge pull request #46932 from JFonS/fix_lm_capture_env
[3.2] Batch of lightmapper fixes and minor improvements
2021-03-12 12:30:36 +01:00
JFonS
e2c28675ef Batch of lightmapper fixes and minor improvements
- Fix objects with no material being considered as fully transparent by the lightmapper.
- Added "environment_min_light" property: gives artistic control over the shadow color.
- Fixed "Custom Color" environment mode, it was ignored before.
- Added "interior" property to BakedLightmapData: controls whether dynamic capture objects receive environment light or not.
- Automatically update dynamic capture objects when the capture data changes (also works for "energy" which used to require object movement to trigger the update).
- Added "use_in_baked_light" property to GridMap: controls whether the GridMap will be included in BakedLightmap bakes.
- Set "flush zero" and "denormal zero" mode for SSE2 instructions in the Embree raycaster. According to Embree docs it should give a performance improvement.
2021-03-12 12:00:53 +01:00
O01eg
18eca32761 Fix visibility for GCC
(cherry picked from commit 1393ededfd)
2021-03-12 10:07:48 +01:00
Rémi Verschelde
0d8182d2b1 NoiseTexture: Fix regression in starting thread
Was a regression from #45618.

Fixes #46907.
2021-03-11 21:58:53 +01:00
Duddino
aabb8d78ef Added some checks to prevent accessing a null collider
Previously godot would try to access
`CollisionObjectBullet::bt_collision_object` even if it was null.
Fixes #46651

(cherry picked from commit c47070e165)
2021-03-07 22:51:06 +01:00
Rémi Verschelde
558d524bcb Mono: Don't use C++17 [[maybe_unused]] to preserve C++14 compatibility
The 3.2 branch compiles against the C++14 standard to keep good compatibility
with somewhat older compilers.

Fixes #45839.
2021-03-05 23:28:09 +01:00
Shane Liesegang
4d06a5c2b0 Mono/macOS: Separate data dir into frameworks and resources for codesigning
Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
(cherry picked from commit 42eb09ddcc)
2021-03-04 12:21:17 +01:00
Fabian
2aafe2b25e Add set_peer_timeout to NetworkedMultiplayerENet.
(cherry picked from commit 1b54de3039)
2021-03-02 10:26:14 +01:00
Aaron Franke
b2d723b039 Add generic support to PackedScene.Instance
(cherry picked from commit 3f50954ced)
2021-03-02 10:26:14 +01:00
Bastiaan Olij
9c296bcb59 Fix duplicate check for bone names in FBX import 2021-03-02 10:55:29 +11:00
Jack Linhart
8190305075 Added GridMap description to get_bake_meshes()
(cherry picked from commit 03fd2b4c86)
2021-02-25 22:37:29 +01:00
Hugo Locurcio
b3c01392fd Document seamless noise having a lower contrast than non-seamless noise
See #41787.

(cherry picked from commit 2e8e6e26a8)
2021-02-25 22:37:04 +01:00
Taylor C. Richberger
59b82e1b6a remove invalid codeLensProvider value from lsp
codeLensProvider was false, it may not be a boolean like some of the other providers can, only optionally present.

(cherry picked from commit 91ce8d5fff)
2021-02-25 22:34:56 +01:00
Rémi Verschelde
92d59d0879 SCons: Properly handle overriding default values to bool options
The `dev=yes` and `production=yes` options work as aliases to set a number of
options, while still aiming to allow overriding specific options if the user
wishes so. (E.g. `production=yes use_lto=no` should work to enable production
defaults *but* disable LTO.)

That wasn't working as `ARGUMENTS.get()` returns a string and not a boolean as
expected by `BoolVariable`, and this wasn't flagged as a bug... So added a
helper method using SCons' `BoolVariable._text2bool` to do the conversion
manually.
2021-02-24 10:20:46 +01:00
Rémi Verschelde
6b2cfa416c SCons: Work around compilation issue on Linux ARM64
Fixes #45687.

This is really just a band-aid, our current buildsystem doesn't work well for
cross-compilation and needs a thorough refactoring to do so.
2021-02-23 14:08:45 +01:00
Pedro J. Estébanez
6f4f49c1d5 Make glue generation shutdown more graceful
(cherry picked from commit 23907e6f19)
2021-02-22 21:40:16 +01:00
Angad Kambli
327586f582 fix minor issue in smooth step function's documentation
(cherry picked from commit 892060fa47)
2021-02-22 14:16:42 +01:00
Marcel Admiraal
e89ba5fb49 Add missing semicolons to webxr.eterns.js
(cherry picked from commit 92e0a84a4c)
2021-02-22 10:17:23 +01:00
Vignesh1-art
13871deb57 Fixed Invalid function bindings #46135
Fixed  GDScriptLanguageProtocol::notify_client - have 3 arguments, but only 2 are binded

(cherry picked from commit a5d931033e)
2021-02-18 23:46:54 +01:00
Rémi Verschelde
001aaa7131
Merge pull request #45356 from asmaloney/fix-lightmap-raycaster-compile
[3.2] Fix sign comparison error in lightmap_raycaster.cpp
2021-02-18 21:09:29 +01:00
Pedro J. Estébanez
4485b43a57 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 12:23:25 +01:00
Pedro J. Estébanez
6d89f675b1 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez
8f6a636ae7 Modernize Semaphore
- Based on C++11's `mutex` and `condition_variable`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez
4ddcdc031b Modernize Mutex
- Based on C++11's `mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
- `BinaryMutex` added for special cases as the non-recursive version
- `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`.
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
2021-02-18 11:58:08 +01:00
JFonS
71d4e47452 Fix missing include in MacOS builds 2021-02-17 11:19:28 +01:00
Ellen Poe
fc0419d84a
Fix mono->stereo conversion for oggs (see #40630)
(cherry picked from commit f993d2eeee)
2021-02-16 14:27:40 +01:00
Ellen Poe
5db83defcd
Fail mp3 loading when attempting to load invalid mp3s
This also adds a warning for unspecified MP3 loading error codes

(cherry picked from commit 936767deca)
2021-02-16 14:27:40 +01:00
Rafał Mikrut
54b6a7b8b7
Fix memory leak in Xatlas module
(cherry picked from commit e57b8d79ec)
2021-02-16 14:27:38 +01:00
Bastiaan Olij
8aa022f99c
Only unload the library when no NativeScript objects exist if the reloadable flag is true. If it is false it is likely the library does other things and can't be unloaded
(cherry picked from commit ae7675065a)
2021-02-16 14:27:38 +01:00
JFonS
56bf256d76 Add options to reduce lightmaps disk usage.
Added BakedLightmap.use_hdr and BakedLightmap.use_color properties
that can reduce the flie size of lightmap texture at the expense of quality.

Changed the denoiser to work in a single buffer, reducing RAM
usage. Also added the `-mstackrealign` flag in the denoiser compilation
for MinGW builds. This flag helped fix a bug in Embree, so I want to see
if it will help fix GH #45296.
2021-02-16 13:20:27 +01:00
JFonS
7241139356 Backport EXR compression support from master 2021-02-15 12:51:55 +01:00
Meriipu
347a9df0a1
GDScript: Clarified/fixed inaccuracies in the built-in function docs.
The input to smoothstep is not actually a weight, and the decscription
of smoothstep was pretty hard to understand and easy to misinterpret.

Clarified what it means to be approximately equal.

nearest_po2 does not do what the descriptions says it does. For one,
it returns the same power if the input is a power of 2. Second, it
returns 0 if the input is negative or 0, while the smallest possible
integral power of 2 actually is 1 (2^0 = 1). Due to the implementation
and how it is used in a lot of places, it does not seem wise to change
such a core function however, and I decided it is better to alter the
description of the built-in.

Added a few examples/clarifications/edge-cases.

(cherry picked from commit 7f9bfee0ac)
2021-02-11 13:12:06 +01:00
Gordon MacPherson
53aee600d3 fixed bug in vertex duplication breaking meshes 2021-02-09 16:33:46 +00:00
Kanabenki
3abe6ae281
Snap VisualScript comment to grid when resizing
(cherry picked from commit 07fb7f9888)
2021-02-08 22:36:36 +01:00
Rémi Verschelde
f36c529ad0
Merge pull request #45752 from JFonS/cpu_lightmapper_fixes
Assorted CPU lightmapper fixes
2021-02-06 11:44:52 +01:00
JFonS
27c1e65969 Assorted CPU lightmapper fixes
- Fix crash when a ray hits a texel with a UV2 coordinate exactly
  equal to 1.0.
- Take BakedLightmap extents into account.
- Clear capture data between bakes.
- Fix minor issues with seam correction.
2021-02-05 19:18:19 +01:00
Hugo Locurcio
4a74f6f3b7 Document that GridMap doesn't support visual layers or cull masks
See #40245.

(cherry picked from commit 95fda7e881)
2021-02-05 10:26:03 +01:00
bruvzg
9e4cecc8ea [Mono] Use the same search logic for both MSBuild and dotnet, add custom search paths on macOS.
(cherry picked from commit e304f716c7)
2021-02-05 09:29:29 +01:00