Commit graph

818 commits

Author SHA1 Message Date
bruvzg
df968d577a
[macOS] Implement seamless display scaling. 2020-07-04 10:36:33 +03:00
Rémi Verschelde
eeb61ec896
Merge pull request #40071 from reduz/fix-content-scale
Fix content scale mode, closes #37941
2020-07-03 07:50:50 +02:00
Juan Linietsky
ac7e9479ce Fix content scale mode, closes #37941 2020-07-02 17:16:13 -03:00
Juan Linietsky
d3adc53ad9 Ensure cursor shape changes when exiting window, fixes #37724 2020-07-02 14:17:46 -03:00
Rémi Verschelde
afe03e872b
Merge pull request #34926 from Xrayez/draw-transform-defaults
Provide `draw_set_transform` defaults for rotation and scale
2020-07-02 09:06:06 +02:00
Rémi Verschelde
0636e2a877
Merge pull request #40020 from reduz/fix-tree-edit-focus
Fix doubleclick on tree item, restore input focus on previous windows.
2020-07-02 07:26:13 +02:00
Juan Linietsky
39a77735bd Add ability to clamp embedded subwindows to parent, fixes #37792 2020-07-01 12:49:35 -03:00
Juan Linietsky
058166fb6c Fix doubleclick on tree item, restore input focus on previous windows.
Closes #37335
2020-07-01 12:46:39 -03:00
Andrii Doroshenko (Xrayez)
851c1050b2 Provide draw_set_transform defaults for rotation and scale 2020-07-01 18:09:11 +03:00
Juan Linietsky
239942cfef Ensure embedded mode works again
Also implemented application in/out notifications in X11.
2020-07-01 09:27:43 -03:00
Juan Linietsky
b19ab945ac Make dialogs exclusive by default, fixes #37732
Also fix on set_visible, not creating exclusive children as it should.
2020-06-30 14:02:37 -03:00
Juan Linietsky
438c380458 Add a separate application focus/in notification out from Window focus notification. 2020-06-30 10:40:06 -03:00
Juan Linietsky
201d606b3d Addition of SDFGI for open world global illumination
Move GI to a deferred pass
2020-06-26 11:06:48 -03:00
Rémi Verschelde
35414f1dec
Merge pull request #39053 from timoschwarzer/static-assert-variant-arg-max
Add static_assert checks where code assumes VARIANT_ARG_MAX == 5
2020-06-19 23:51:22 +02:00
Nathan Franke
dc1ca8fbd0
Change "ParentNode" to "Inherit" in Texture Options 2020-06-14 16:02:00 -05:00
Maganty Rushyendra
a2392039af Fix signal duplication bug when duplicating node with instanced children
Change error checking in `duplicate_signals()` to check for path to
`p_original`, thus adhering to the method used in `duplicate`, instead
of checking for ownership.
2020-06-09 21:24:05 +08:00
Timo Schwarzer
05b32fc01d
Add static_assert checks where code assumes VARIANT_ARG_MAX == 5 2020-05-25 21:55:03 +02:00
Rémi Verschelde
4c8832701b
Merge pull request #38695 from dreamsComeTrue/node-swap-order-arguments
Replace 'add_child_below_node' with 'add_sibling' in Node
2020-05-17 11:36:05 +02:00
unknown
634e9460b9 Fix popup window size calculation in popup_centered_ratio by using Rect2 2020-05-17 03:06:42 +05:30
bruvzg
08e80ccd99
Fix popup positions on multiple screens (with same scaling only). 2020-05-16 14:11:43 +03:00
Dominik 'dreamsComeTrue' Jasiński
7f5c81c32f Replace 'add_child_below_node' with 'add_sibling' in Node
Fixes: #19642
2020-05-15 22:02:00 +02:00
Rémi Verschelde
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde
07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde
1a8167867b Modernize remaining uses of 0/NULL instead of nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2020-05-14 13:45:01 +02:00
Rémi Verschelde
1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00
Rémi Verschelde
69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde
e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde
03b13e0c69 Style: Add missing copyright headers 2020-05-10 13:12:16 +02:00
Hugo Locurcio
3a11baaeac
Turn the anisotropic filtering setting into an enum
Since it only accepts power-of-two values, exposing it as an enum
makes more sense. This also allows for adding property hints to indicate
the performance cost of each value.

This also improves property hints for MSAA and FXAA.
2020-05-08 12:07:35 +02:00
Rémi Verschelde
f7ca1c805b doc: Sync classref with current source 2020-05-04 16:55:01 +02:00
Rémi Verschelde
878adb22b7
Merge pull request #37717 from qarmin/world_fix
Change non-existent World to World3D
2020-05-04 16:37:40 +02:00
Rémi Verschelde
fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
Juan Linietsky
5d4dc2d45c Add ability to bind typed arrays to script API
Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells
Note: Will do a mass replace on later PRs of whathever I can find, but probably need
a tool to grep through doc.
Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
2020-04-21 10:15:40 +02:00
Rémi Verschelde
b7b46093d8 doc: Sync classref with current source
Add missing enum bindings.
2020-04-20 11:48:00 +02:00
Rémi Verschelde
088c2a0870
Merge pull request #37947 from clayjohn/DOCS-rendering-update
Update many docs with recent rendering changes
2020-04-20 11:16:12 +02:00
qarmin
559bc3ca87 Change non-existent World to World3D 2020-04-18 11:00:51 +02:00
clayjohn
b50d954cb0 Update many docs with recent rendering changes 2020-04-17 09:47:59 -07:00
Juan Linietsky
0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
Juan Linietsky
5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
Juan Linietsky
a57dc398db Implement MSAA 2020-04-12 15:33:57 -03:00
Juan Linietsky
16ae2cc1bf Add screen space AA option, with FXAA implementation. 2020-04-12 10:57:18 -03:00
Bastiaan Olij
afc8c6391c Renaming all ARVR nodes to XR 2020-04-09 15:33:01 +10:00
Juan Linietsky
4ffc0d6b3f Refactored shadowmapping.
- Made shadow bias size independent, so it will remain when changing light or camera size.
- Implemented normal offset bias, which greatly enhances quality.
- Added transmission to subsurface scattering
- Reimplemented shadow filter modes

Closes #17260
2020-04-08 11:19:43 -03:00
Rémi Verschelde
026ec44b02
Merge pull request #37551 from KoBeWi/found_your_screen
Add the missing argument in files_dropped signal
2020-04-07 09:18:38 +02:00
Rémi Verschelde
6b07c72d76
Merge pull request #37556 from KoBeWi/kill_get_index
Remove Node.get_position_in_parent()
2020-04-06 09:44:38 +02:00
Tomasz Chabora
c1023157eb Remove Node.get_position_in_parent() 2020-04-06 01:19:20 +02:00
Michael Alexsander
a9e43ac73c Re-expose a simplified version of the stretch properties in SubViewport 2020-04-03 14:11:22 -03:00
Tomasz Chabora
16cbfcf0de Add the missing argument in files_dropped signal 2020-04-03 17:33:53 +02:00
Rémi Verschelde
ea7b497065 Replace more occurrences of NULL with nullptr 2020-04-02 14:56:01 +02:00