Commit graph

337 commits

Author SHA1 Message Date
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
Rémi Verschelde cfd84625f0 Move DocData and Collada out of their subfolders
Now that the unused DocDump was removed, the `editor/doc` subfolder is
redundant.

Similarly, there's no reason for Collada to have a subfolder for itself
when glTF or OBJ don't.
2020-03-24 09:56:04 +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
luz.paz 7bf6e5f773 Fix various typos
Found via `codespell`
2020-03-11 13:59:18 -04: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
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
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
Rémi Verschelde afa773f388
Merge pull request #36564 from dankan1890/quick_fix
Fixed TextureAtlas import size.
2020-02-26 19:07:43 +01:00
Maurizio Petrarota 744c1fafff
Fixed TextureAtlas import. 2020-02-26 14:35:57 +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
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 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
Juan Linietsky 867d073b98 Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr. 2020-02-15 08:36:04 -03: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 2049dec79e Added normalmap guided roughness mipmap generator, and a global roughness limiter. 2020-02-11 12:16:01 +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
bruvzg 26318f3bd1 Fix Vector3 ambiguities and out of bounds init. 2020-02-11 12:03:39 +01:00
Juan Linietsky d5cf1a872b Fixes to Basis Universal. 2020-02-11 12:02:59 +01:00
Juan Linietsky 4aea9f74e6 Rewritten StreamTexture for better code reuse, added basis universal support 2020-02-11 12:02:36 +01:00
Juan Linietsky dc32083681 Proper texture reloading (was broken). 2020-02-11 12:01:25 +01:00
Juan Linietsky dd3682e5fe Modernized default 3D material, fixes material bugs. 2020-02-11 12:01:24 +01:00
Juan Linietsky 6deffa62fb Several fixes to 3D rendering, and multimesh implementation. 2020-02-11 12:01:22 +01:00
Juan Linietsky 449df8f688 Base 3D engine done, still untested, though. 2020-02-11 11:59:25 +01:00
bruvzg eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky 24b16f3bf0 Fix crash on import. 2020-02-11 11:53:28 +01:00
Juan Linietsky 9b0dd4f571 A lot of progress with canvas rendering, still far from working. 2020-02-11 11:53:27 +01:00
Juan Linietsky 3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Rémi Verschelde f3726ee994 Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.
2020-02-07 11:50:40 +01:00
Marcel Admiraal 6d69cd40bd Add do..while(0) wrappers to macros without one.
- Add do..while(0) wrapper to ERR_FAIL_NULL macros.
- Add do..while(0) wrapper to ERR_FAIL_COND macros.
- Add do..while(0) wrapper to ERR_CONTINUE macros.
- Add do..while(0) wrapper to ERR_BREAK macros.
- Add do..while(0) wrapper to CRASH_COND macros.
- Add do..while(0) wrapper to ERR_FAIL macros.
- Add do..while(0) wrapper to ERR_PRINT macros.
- Add do..while(0) wrapper to WARN_PRINT macros.
- Add do..while(0) wrapper to WARN_DEPRECATED macros.
- Add do..while(0) wrapper to CRASH_NOW macros.
2020-02-05 11:19:12 +01:00
Marcel Admiraal f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Hugo Locurcio a002b93d86
Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
Rémi Verschelde 4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
Haoyu Qiu 92b36d4706 Adds NULL check before using image loader 2020-01-16 21:49:23 +08:00
Bastiaan Olij ad6d06dc21 Add option to apply an offset to obj mesh import 2020-01-11 19:27:00 +11:00
K. S. Ernest (iFire) Lee 0172a7f932 Use cycle and loop hint flags in glTF2. 2020-01-10 08:02:16 -08:00
K. S. Ernest (iFire) Lee f028b8b0e4 Support GLTF2 alpha scissors. 2020-01-02 11:52:08 -08:00
Rémi Verschelde bde52cc688
Merge pull request #34618 from qarmin/vector_please_dont_crash
Don't use constant reference in Vector push_back, insert and append_array
2020-01-02 15:44:41 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rafał Mikrut 1ac701cc37 Don't use constant reference in Vector push_back, insert and append_array 2019-12-26 17:38:08 +01:00
Marios Staikopoulos d3cf8cfb7d Fix Hard Crash on glTF Color Accessor Import 2019-12-24 15:03:24 -08:00
Rafał Mikrut ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Marios Staikopoulos 4b28fd4f23 Bugfix: Sanitize glTF importer Animation Names and do not set bone_pose 2019-11-27 12:20:38 -08:00
K. S. Ernest (iFire) Lee 80b1604fa9 33714 glTF2 handle undefined load-time scene. 2019-11-22 08:48:23 -08:00
Rémi Verschelde ab3bccdb78 Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-11-22 08:35:03 +01:00
Rémi Verschelde 28613ab8c9
Merge pull request #33794 from nekomatata/gltf-morph-shapes-crash2
Error instead of crash in gltf import with more than one morph target
2019-11-21 22:09:08 +01:00
PouleyKetchoupp e949665489 Error instead of crash in gltf import with more than one morph target
Redone from PR #33782 to fix the crash without adding compatibility with Blender 2.8
Helps with #16124, while Blender 2.81 has the proper export fix.
2019-11-21 17:25:01 +01:00
K. S. Ernest (iFire) Lee d0de373884 33756 gltf2 importer should use zfar 2019-11-21 07:52:18 -08:00