summaryrefslogtreecommitdiff
path: root/scene/2d
AgeCommit message (Collapse)Author
2020-04-13Handle huge offset values in Path2D and Path3D set_offsetMickeMakaron
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30Merge pull request #37436 from akien-mga/doc-node-renamesRémi Verschelde
doc: Update classref with node renames
2020-03-30doc: Update classref with node renamesRémi Verschelde
A few extra renames for classes which were missed in last week's PRs.
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
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-28More server renames for consistency after #37361Rémi Verschelde
2020-03-28Fixed missed occurrences in #37361 renamings.dankan1890
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-27Rename more 2D and 3D nodes to follow conventionRémi Verschelde
Rename editor plugins to match the new node names.
2020-03-27Renamed 2D and 3D nodes to make their types explicitJuan Linietsky
Fixes #30736.
2020-03-26Open sub-windows as embedded if the OS does not support themJuan Linietsky
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-03-26Working multiple window support, including editorJuan Linietsky
2020-03-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-03-26Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky
2020-03-26Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky
2020-03-25Fix volume interpolation in positional audio nodesWaridley
Fixes #22016
2020-03-24Remove unused classes and stray headersRémi Verschelde
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-20Merge pull request #37169 from AndreaCatania/AndreaCatania-patch-2Rémi Verschelde
Fixes navigation path reset
2020-03-19Fixes navigation path resetAndrea Catania
2020-03-17Fix visibility enabler flag togglingTomasz Chabora
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
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-02-29Fix inverted use of Camera2D.offset_vEevee
The code above for horizontal movement uses the right margin (_positive_ x direction) when the offset is negative, but vertical movement uses the top margin (_negative_ y direction) when the offset is negative. The resulting problem is easily seen in the editor — set the drag margins to be asymmetrical, turn on drawing the drag margins, and slide the offsets from -1 to 1 and back. The horizontal offset moves the camera's center between the left and right margins, but the vertical offset gets them backwards and will move the camera outside the margins entirely.
2020-02-28Signals: Manually port most of remaining connect_compat usesRémi Verschelde
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-28Signals: Port connect calls to use callable_mpRémi Verschelde
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-28Merge pull request #36388 from AndreaCatania/some_renamesRémi Verschelde
Rename Navigation{Mesh,Polygon}Instance and PlaneShape for clarity
2020-02-28Renamed NavigationPolygonInstance to NavigationRegion2DAndrea Catania
2020-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
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-25Added missing destructor for Navigation2DDominik 'dreamsComeTrue' Jasiński
Although destructor call was missing, it still doesn't heal #36537 memory leaks. Further description how that might be overcome - on GitHub Partialy covers #36537
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- 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-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-20Fix MIMPAMPS typos in constants throughout the engineAndrii Doroshenko (Xrayez)
2020-02-18Added utility functions to the new NavigationServer:Andrea Catania
- 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-18Fix arguments/default values in CanvasItem bindingsRémi Verschelde
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-15Reduce AudioStreamPlayer's pitch_scale max valueWARIO-MDMA
2020-02-14Fixes memory leak in NavigationPolygonHaoyu Qiu
2020-02-12Merge pull request #36145 from akien-mga/remove-deprecated-friction-bounceRémi Verschelde
Remove deprecated PhysicsBody friction and bounce parameters
2020-02-12ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky
32 bits.
2020-02-12Remove deprecated PhysicsBody friction and bounce parametersRémi Verschelde
They were replaced in 3.1 by PhysicsMaterial properties via #12403.
2020-02-11Vulkan: Move thirdparty code out of drivers, style fixesRémi Verschelde
- `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-11Fixed 2D and 3D CPU ParticlesJuan Linietsky
2020-02-11Several fixes to 3D rendering, and multimesh implementation.Juan Linietsky
2020-02-11Add static Vulkan loader.bruvzg
Initial Vulkan support for Windows. Initial Vulkan support for macOS.
2020-02-11Completed material/2D shader support (missing SCREEN_TEXTURE)Juan Linietsky
2020-02-11Modified light rendering to make it more compatible.Juan Linietsky
Modified polygon management to make it more compatible with MoltenVK
2020-02-112D lighting seems more or less complete.Juan Linietsky
2020-02-11Normalmapping and Specularmapping working in 2D engineJuan Linietsky
Added support for Sprite, AnimatedSprite and Polygon2D (should add for tileset eventually).