feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
from misc.utility.scons_hints import *
|
||||
|
||||
Import("env")
|
||||
Import("env_modules")
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@
|
|||
</signals>
|
||||
<constants>
|
||||
<constant name="TARGET_RAY_MODE_UNKNOWN" value="0" enum="TargetRayMode">
|
||||
We don't know the the target ray mode.
|
||||
We don't know the target ray mode.
|
||||
</constant>
|
||||
<constant name="TARGET_RAY_MODE_GAZE" value="1" enum="TargetRayMode">
|
||||
Target ray originates at the viewer's eyes and points in the direction they are looking.
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
#include "webxr_interface.h"
|
||||
#include "webxr_interface.compat.inc"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
void WebXRInterface::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("is_session_supported", "session_mode"), &WebXRInterface::is_session_supported);
|
||||
ClassDB::bind_method(D_METHOD("set_session_mode", "session_mode"), &WebXRInterface::set_session_mode);
|
||||
|
|
|
|||
|
|
@ -271,19 +271,19 @@ void WebXRInterfaceJS::_set_environment_blend_mode(String p_blend_mode_string) {
|
|||
|
||||
StringName WebXRInterfaceJS::get_name() const {
|
||||
return "WebXR";
|
||||
};
|
||||
}
|
||||
|
||||
uint32_t WebXRInterfaceJS::get_capabilities() const {
|
||||
return XRInterface::XR_STEREO | XRInterface::XR_MONO | XRInterface::XR_VR | XRInterface::XR_AR;
|
||||
};
|
||||
}
|
||||
|
||||
uint32_t WebXRInterfaceJS::get_view_count() {
|
||||
return godot_webxr_get_view_count();
|
||||
};
|
||||
}
|
||||
|
||||
bool WebXRInterfaceJS::is_initialized() const {
|
||||
return (initialized);
|
||||
};
|
||||
}
|
||||
|
||||
bool WebXRInterfaceJS::initialize() {
|
||||
XRServer *xr_server = XRServer::get_singleton();
|
||||
|
|
@ -333,7 +333,7 @@ bool WebXRInterfaceJS::initialize() {
|
|||
};
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
void WebXRInterfaceJS::uninitialize() {
|
||||
if (initialized) {
|
||||
|
|
@ -378,7 +378,7 @@ void WebXRInterfaceJS::uninitialize() {
|
|||
environment_blend_mode = XRInterface::XR_ENV_BLEND_MODE_OPAQUE;
|
||||
initialized = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Dictionary WebXRInterfaceJS::get_system_info() {
|
||||
Dictionary dict;
|
||||
|
|
@ -427,7 +427,7 @@ Size2 WebXRInterfaceJS::get_render_target_size() {
|
|||
render_targetsize.height = (float)js_size[1];
|
||||
|
||||
return render_targetsize;
|
||||
};
|
||||
}
|
||||
|
||||
Transform3D WebXRInterfaceJS::get_camera_transform() {
|
||||
Transform3D camera_transform;
|
||||
|
|
@ -445,7 +445,7 @@ Transform3D WebXRInterfaceJS::get_camera_transform() {
|
|||
}
|
||||
|
||||
return camera_transform;
|
||||
};
|
||||
}
|
||||
|
||||
Transform3D WebXRInterfaceJS::get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) {
|
||||
XRServer *xr_server = XRServer::get_singleton();
|
||||
|
|
@ -464,7 +464,7 @@ Transform3D WebXRInterfaceJS::get_transform_for_view(uint32_t p_view, const Tran
|
|||
transform_for_view.origin *= world_scale;
|
||||
|
||||
return p_cam_transform * xr_server->get_reference_frame() * transform_for_view;
|
||||
};
|
||||
}
|
||||
|
||||
Projection WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) {
|
||||
Projection view;
|
||||
|
|
@ -527,7 +527,7 @@ Vector<BlitToScreen> WebXRInterfaceJS::post_draw_viewport(RID p_render_target, c
|
|||
texture_storage->render_target_set_reattach_textures(p_render_target, false);
|
||||
|
||||
return blit_to_screen;
|
||||
};
|
||||
}
|
||||
|
||||
RID WebXRInterfaceJS::_get_color_texture() {
|
||||
unsigned int texture_id = godot_webxr_get_color_texture();
|
||||
|
|
@ -561,8 +561,8 @@ RID WebXRInterfaceJS::_get_texture(unsigned int p_texture_id) {
|
|||
uint32_t view_count = godot_webxr_get_view_count();
|
||||
Size2 texture_size = get_render_target_size();
|
||||
|
||||
RID texture = texture_storage->texture_create_external(
|
||||
view_count == 1 ? GLES3::Texture::TYPE_2D : GLES3::Texture::TYPE_LAYERED,
|
||||
RID texture = texture_storage->texture_create_from_native_handle(
|
||||
view_count == 1 ? RS::TEXTURE_TYPE_2D : RS::TEXTURE_TYPE_LAYERED,
|
||||
Image::FORMAT_RGBA8,
|
||||
p_texture_id,
|
||||
(int)texture_size.width,
|
||||
|
|
@ -608,7 +608,7 @@ void WebXRInterfaceJS::process() {
|
|||
_update_input_source(i);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
void WebXRInterfaceJS::_update_input_source(int p_input_source_id) {
|
||||
XRServer *xr_server = XRServer::get_singleton();
|
||||
|
|
@ -871,13 +871,13 @@ WebXRInterfaceJS::WebXRInterfaceJS() {
|
|||
initialized = false;
|
||||
session_mode = "inline";
|
||||
requested_reference_space_types = "local";
|
||||
};
|
||||
}
|
||||
|
||||
WebXRInterfaceJS::~WebXRInterfaceJS() {
|
||||
// and make sure we cleanup if we haven't already
|
||||
if (initialized) {
|
||||
uninitialize();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#endif // WEB_ENABLED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue