Skip to content

Commit beb6ca4

Browse files
authored
Merge branch 'godotengine:master' into sky-material-drop-panorama
2 parents d8e8165 + 4173760 commit beb6ca4

178 files changed

Lines changed: 3659 additions & 869 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@
179179
/modules/openxr/ @godotengine/xr
180180
/modules/openxr/doc_classes/ @godotengine/xr @godotengine/documentation
181181
/modules/openxr/editor/ @godotengine/xr @godotengine/editor
182+
/modules/visionos_xr/ @godotengine/xr
183+
/modules/visionos_xr/doc_classes/ @godotengine/xr @godotengine/documentation
182184
/modules/webxr/ @godotengine/xr
183185
/modules/webxr/doc_classes/ @godotengine/xr @godotengine/documentation
184186

.github/workflows/android_builds.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,20 @@ jobs:
6868
run: python ./misc/scripts/install_swappy_android.py
6969

7070
- name: Download Perfetto
71-
run: python ./misc/scripts/install_perfetto.py
71+
shell: sh
72+
id: perfetto_sdk
73+
run: |
74+
if python ./misc/scripts/install_perfetto.py; then
75+
echo "PROFILER_ENABLED=perfetto" >> "$GITHUB_OUTPUT"
76+
else
77+
echo "::warning::Perfetto installation failed, building without Perfetto support."
78+
echo "PROFILER_ENABLED=none" >> "$GITHUB_OUTPUT"
79+
fi
7280
7381
- name: Compilation
7482
uses: ./.github/actions/godot-build
7583
with:
76-
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }}
84+
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }} profiler=${{ steps.perfetto_sdk.outputs.PROFILER_ENABLED }}
7785
platform: android
7886
target: ${{ matrix.target }}
7987

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 🕶️ visionOS Builds
2+
on:
3+
workflow_call:
4+
workflow_dispatch:
5+
6+
# Global Settings
7+
env:
8+
SCONS_FLAGS: >-
9+
dev_mode=yes
10+
module_text_server_fb_enabled=yes
11+
debug_symbols=no
12+
13+
jobs:
14+
visionos-template:
15+
# From https://docs.github.com/en/actions/how-tos/write-workflows/choose-where-workflows-run/choose-the-runner-for-a-job#choosing-github-hosted-runners
16+
runs-on: macos-26
17+
name: Template (target=template_release)
18+
timeout-minutes: 60
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6
23+
with:
24+
submodules: recursive
25+
26+
- name: Restore Godot build cache
27+
uses: ./.github/actions/godot-cache-restore
28+
continue-on-error: true
29+
30+
- name: Setup Python and SCons
31+
uses: ./.github/actions/godot-deps
32+
33+
- name: Compilation (arm64)
34+
uses: ./.github/actions/godot-build
35+
with:
36+
scons-flags: ${{ env.SCONS_FLAGS }}
37+
platform: visionos
38+
target: template_release
39+
40+
- name: Save Godot build cache
41+
uses: ./.github/actions/godot-cache-save
42+
continue-on-error: true
43+
44+
- name: Upload artifact
45+
uses: ./.github/actions/upload-artifact

core/os/keyboard.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,29 @@ static const _KeyCodeText _keycodes[] = {
6262
{Key::PAGEDOWN ,"PageDown"},
6363
{Key::SHIFT ,"Shift"},
6464
{Key::CTRL ,"Ctrl"},
65+
// Include all strings for all platforms. The first string
66+
// should be the one expected from get_keycode_string().
6567
#if defined(MACOS_ENABLED)
6668
{Key::META ,"Command"},
69+
{Key::META ,"Windows"},
70+
{Key::META ,"Meta"},
6771
{Key::CMD_OR_CTRL ,"Command"},
6872
{Key::ALT ,"Option"},
73+
{Key::ALT ,"Alt"},
6974
#elif defined(WINDOWS_ENABLED)
7075
{Key::META ,"Windows"},
76+
{Key::META ,"Command"},
77+
{Key::META ,"Meta"},
7178
{Key::CMD_OR_CTRL ,"Ctrl"},
7279
{Key::ALT ,"Alt"},
80+
{Key::ALT ,"Option"},
7381
#else
7482
{Key::META ,"Meta"},
83+
{Key::META ,"Windows"},
84+
{Key::META ,"Command"},
7585
{Key::CMD_OR_CTRL ,"Ctrl"},
7686
{Key::ALT ,"Alt"},
87+
{Key::ALT ,"Option"},
7788
#endif
7889
{Key::CAPSLOCK ,"CapsLock"},
7990
{Key::NUMLOCK ,"NumLock"},

core/templates/hashfuncs.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ template <typename, typename = std::void_t<>>
164164
struct has_hash_method : std::false_type {};
165165

166166
template <typename T>
167-
struct has_hash_method<T, std::void_t<std::is_same<decltype(std::declval<const T>().hash()), uint32_t>>> : std::true_type {};
167+
struct has_hash_method<T, std::enable_if_t<std::is_same_v<decltype(std::declval<const T>().hash()), uint32_t>>> : std::true_type {};
168168

169169
template <typename T>
170170
constexpr bool has_hash_method_v = has_hash_method<T>::value;
@@ -207,6 +207,9 @@ struct HashMapHasherDefaultImpl<char *> {
207207
static _FORCE_INLINE_ uint32_t hash(const char *p_cstr) { return hash_djb2(p_cstr); }
208208
};
209209

210+
template <>
211+
struct HashMapHasherDefaultImpl<const char *> : HashMapHasherDefaultImpl<char *> {};
212+
210213
template <>
211214
struct HashMapHasherDefaultImpl<wchar_t> {
212215
static _FORCE_INLINE_ uint32_t hash(const wchar_t p_wchar) { return hash_fmix32(uint32_t(p_wchar)); }
@@ -285,7 +288,7 @@ template <typename, typename = std::void_t<>>
285288
struct has_is_same_method : std::false_type {};
286289

287290
template <typename T>
288-
struct has_is_same_method<T, std::void_t<std::is_same<decltype(std::declval<const T>().is_same(std::declval<const T>())), uint32_t>>> : std::true_type {};
291+
struct has_is_same_method<T, std::enable_if_t<std::is_same_v<decltype(std::declval<const T>().is_same(std::declval<const T>())), bool>>> : std::true_type {};
289292

290293
template <typename T>
291294
constexpr bool has_is_same_method_v = has_is_same_method<T>::value;

core/variant/variant_construct.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void Variant::_unregister_variant_constructors() {
261261
}
262262
}
263263

264-
void Variant::construct(Variant::Type p_type, Variant &p_base, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
264+
void Variant::construct(Variant::Type p_type, Variant &r_base, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
265265
ERR_FAIL_INDEX(p_type, Variant::VARIANT_MAX);
266266
uint32_t s = construct_data[p_type].size();
267267
for (uint32_t i = 0; i < s; i++) {
@@ -281,7 +281,7 @@ void Variant::construct(Variant::Type p_type, Variant &p_base, const Variant **p
281281
continue;
282282
}
283283

284-
construct_data[p_type][i].construct(p_base, p_args, r_error);
284+
construct_data[p_type][i].construct(r_base, p_args, r_error);
285285
return;
286286
}
287287

doc/class.xsd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@
154154
<xs:attribute type="xs:byte" name="index" />
155155
<xs:attribute type="xs:string" name="name" />
156156
<xs:attribute type="xs:string" name="type" />
157+
<xs:attribute type="xs:string" name="enum" use="optional" />
158+
<xs:attribute type="xs:boolean" name="is_bitfield" use="optional" />
157159
<xs:attribute type="xs:string" name="keywords" use="optional" />
158160
</xs:complexType>
159161
</xs:element>

doc/classes/BaseButton.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
Returns [code]true[/code] if the mouse has entered the button and has not left it yet.
3535
</description>
3636
</method>
37+
<method name="press">
38+
<return type="void" />
39+
<description>
40+
Presses the button. This causes the corresponding virtual method to be called and the corresponding signal to be emitted, depending on [member toggle_mode]. If [member disabled] is [code]true[/code], nothing happens.
41+
[b]Note:[/b] This method does not change the visual state of the button and does not grab focus to the button.
42+
</description>
43+
</method>
3744
<method name="set_pressed_no_signal">
3845
<return type="void" />
3946
<param index="0" name="pressed" type="bool" />

doc/classes/DisplayServer.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,9 +1791,8 @@
17911791
<method name="screen_get_max_scale" qualifiers="const">
17921792
<return type="float" />
17931793
<description>
1794-
Returns the greatest scale factor of all screens.
1795-
[b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases.
1796-
[b]Note:[/b] This method is implemented only on macOS.
1794+
Returns the greatest scale factor of all screens. See also [method screen_get_scale].
1795+
[b]Note:[/b] On macOS, the returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases.
17971796
</description>
17981797
</method>
17991798
<method name="screen_get_orientation" qualifiers="const">
@@ -1850,11 +1849,11 @@
18501849
<return type="float" />
18511850
<param index="0" name="screen" type="int" default="-1" />
18521851
<description>
1853-
Returns the scale factor of the specified screen by index. Returns [code]1.0[/code] if [param screen] is invalid.
1852+
Returns the scale factor of the specified screen by index. Returns [code]1.0[/code] if [param screen] is invalid. See also [method screen_get_max_scale].
18541853
[b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS].
18551854
[b]Note:[/b] On macOS, the returned value is [code]2.0[/code] for hiDPI (Retina) screens, and [code]1.0[/code] for all other cases.
18561855
[b]Note:[/b] On Linux (Wayland), the returned value is accurate only when [param screen] is [constant SCREEN_OF_MAIN_WINDOW]. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. [code]1.25[/code] would get rounded up to [code]2.0[/code]).
1857-
[b]Note:[/b] This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland). On other platforms, this method always returns [code]1.0[/code].
1856+
[b]Note:[/b] This method is implemented on Android, iOS, Web, macOS, Linux, and Windows. On other platforms, this method always returns [code]1.0[/code].
18581857
</description>
18591858
</method>
18601859
<method name="screen_get_size" qualifiers="const">

doc/classes/HeightMapShape3D.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<description>
77
A 3D heightmap shape, intended for use in physics to provide a shape for a [CollisionShape3D]. This type is most commonly used for terrain with vertices placed in a fixed-width grid.
88
The heightmap is represented as a 2D grid of height values, which represent the position of grid points on the Y axis. Grid points are spaced 1 unit apart on the X and Z axes, and the grid is centered on the origin of the [CollisionShape3D] node. Internally, each grid square is divided into two triangles.
9-
Due to the nature of the heightmap, it cannot be used to model overhangs or caves, which would require multiple vertices at the same vertical location. Holes can be punched through the collision by assigning [constant @GDScript.NAN] to the height of the desired vertices (this is supported in both GodotPhysics3D and Jolt Physics). You could then insert meshes with their own separate collision to provide overhangs, caves, and so on.
9+
Due to the nature of the heightmap, it cannot be used to model overhangs or caves, which would require multiple vertices at the same vertical location. Holes can be punched through the collision by assigning [constant @GDScript.NAN] to the height of the desired vertices. You could then insert meshes with their own separate collision to provide overhangs, caves, and so on.
1010
[b]Performance:[/b] [HeightMapShape3D] is faster to check collisions against than [ConcavePolygonShape3D], but it is significantly slower than primitive shapes like [BoxShape3D].
1111
A heightmap collision shape can also be built by using an [Image] reference:
1212
[codeblocks]

0 commit comments

Comments
 (0)