feat: updated engine version to 4.4
This commit is contained in:
parent
d08586768d
commit
ba58baf432
140 changed files with 108317 additions and 14666 deletions
|
|
@ -158,9 +158,12 @@ void image_decompress_bcdec(Image *p_image) {
|
|||
|
||||
// Compressed images' dimensions should be padded to the upper multiple of 4.
|
||||
// If they aren't, they need to be realigned (the actual data is correctly padded though).
|
||||
if (width % 4 != 0 || height % 4 != 0) {
|
||||
int new_width = width + (4 - (width % 4));
|
||||
int new_height = height + (4 - (height % 4));
|
||||
const bool need_width_realign = width % 4 != 0;
|
||||
const bool need_height_realign = height % 4 != 0;
|
||||
|
||||
if (need_width_realign || need_height_realign) {
|
||||
int new_width = need_width_realign ? width + (4 - (width % 4)) : width;
|
||||
int new_height = need_height_realign ? height + (4 - (height % 4)) : height;
|
||||
|
||||
print_verbose(vformat("Compressed image's dimensions are not multiples of 4 (%dx%d), aligning to (%dx%d)", width, height, new_width, new_height));
|
||||
|
||||
|
|
|
|||
|
|
@ -1198,10 +1198,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(int8_t)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(int8_t));
|
||||
bv->byte_length = buffer.size() * sizeof(int8_t);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(int8_t);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_UNSIGNED_BYTE: {
|
||||
Vector<uint8_t> buffer;
|
||||
|
|
@ -1223,7 +1224,8 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
}
|
||||
}
|
||||
gltf_buffer.append_array(buffer);
|
||||
bv->byte_length = buffer.size() * sizeof(uint8_t);
|
||||
const size_t buffer_size = buffer.size() * sizeof(uint8_t);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_SIGNED_SHORT: {
|
||||
Vector<int16_t> buffer;
|
||||
|
|
@ -1244,10 +1246,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(int16_t)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(int16_t));
|
||||
bv->byte_length = buffer.size() * sizeof(int16_t);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(int16_t);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_UNSIGNED_SHORT: {
|
||||
Vector<uint16_t> buffer;
|
||||
|
|
@ -1268,10 +1271,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(uint16_t)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(uint16_t));
|
||||
bv->byte_length = buffer.size() * sizeof(uint16_t);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(uint16_t);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_SIGNED_INT: {
|
||||
Vector<int32_t> buffer;
|
||||
|
|
@ -1288,10 +1292,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(uint32_t)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(uint32_t));
|
||||
bv->byte_length = buffer.size() * sizeof(uint32_t);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(int32_t);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_UNSIGNED_INT: {
|
||||
Vector<uint32_t> buffer;
|
||||
|
|
@ -1308,10 +1313,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(uint32_t)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(uint32_t));
|
||||
bv->byte_length = buffer.size() * sizeof(uint32_t);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(uint32_t);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_SINGLE_FLOAT: {
|
||||
Vector<float> buffer;
|
||||
|
|
@ -1328,10 +1334,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(float)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(float));
|
||||
bv->byte_length = buffer.size() * sizeof(float);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(float);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_DOUBLE_FLOAT: {
|
||||
Vector<double> buffer;
|
||||
|
|
@ -1348,10 +1355,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(double)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(double));
|
||||
bv->byte_length = buffer.size() * sizeof(double);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(double);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_HALF_FLOAT: {
|
||||
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "glTF: Half float not supported yet.");
|
||||
|
|
@ -1372,10 +1380,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(int64_t)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(int64_t));
|
||||
bv->byte_length = buffer.size() * sizeof(int64_t);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(int64_t);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
case GLTFAccessor::COMPONENT_TYPE_UNSIGNED_LONG: {
|
||||
Vector<uint64_t> buffer;
|
||||
|
|
@ -1393,10 +1402,11 @@ Error GLTFDocument::_encode_buffer_view(Ref<GLTFState> p_state, const double *p_
|
|||
dst_i++;
|
||||
}
|
||||
}
|
||||
int64_t old_size = gltf_buffer.size();
|
||||
gltf_buffer.resize(old_size + (buffer.size() * sizeof(uint64_t)));
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer.size() * sizeof(uint64_t));
|
||||
bv->byte_length = buffer.size() * sizeof(uint64_t);
|
||||
const int64_t old_size = gltf_buffer.size();
|
||||
const size_t buffer_size = buffer.size() * sizeof(uint64_t);
|
||||
gltf_buffer.resize(old_size + buffer_size);
|
||||
memcpy(gltf_buffer.ptrw() + old_size, buffer.ptrw(), buffer_size);
|
||||
bv->byte_length = buffer_size;
|
||||
} break;
|
||||
}
|
||||
ERR_FAIL_COND_V(buffer_end > bv->byte_length, ERR_INVALID_DATA);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ void initialize_mbedtls_module(ModuleInitializationLevel p_level) {
|
|||
return;
|
||||
}
|
||||
|
||||
GLOBAL_DEF("network/tls/enable_tls_v1.3", false);
|
||||
GLOBAL_DEF("network/tls/enable_tls_v1.3", true);
|
||||
|
||||
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||
int status = psa_crypto_init();
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@
|
|||
|
||||
#include "core/config/project_settings.h"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "editor/editor_settings.h"
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
static void my_debug(void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str) {
|
||||
|
|
@ -148,8 +152,17 @@ Error TLSContextMbedTLS::init_server(int p_transport, Ref<TLSOptions> p_options,
|
|||
}
|
||||
|
||||
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||
if (Engine::get_singleton()->is_editor_hint() || !(bool)GLOBAL_GET("network/tls/enable_tls_v1.3")) {
|
||||
mbedtls_ssl_conf_max_tls_version(&conf, MBEDTLS_SSL_VERSION_TLS1_2);
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
if (!EditorSettings::get_singleton()->get_setting("network/tls/enable_tls_v1.3").operator bool()) {
|
||||
mbedtls_ssl_conf_max_tls_version(&conf, MBEDTLS_SSL_VERSION_TLS1_2);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (!GLOBAL_GET("network/tls/enable_tls_v1.3").operator bool()) {
|
||||
mbedtls_ssl_conf_max_tls_version(&conf, MBEDTLS_SSL_VERSION_TLS1_2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -197,8 +210,17 @@ Error TLSContextMbedTLS::init_client(int p_transport, const String &p_hostname,
|
|||
}
|
||||
|
||||
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||
if (Engine::get_singleton()->is_editor_hint() || !(bool)GLOBAL_GET("network/tls/enable_tls_v1.3")) {
|
||||
mbedtls_ssl_conf_max_tls_version(&conf, MBEDTLS_SSL_VERSION_TLS1_2);
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
if (!EditorSettings::get_singleton()->get_setting("network/tls/enable_tls_v1.3").operator bool()) {
|
||||
mbedtls_ssl_conf_max_tls_version(&conf, MBEDTLS_SSL_VERSION_TLS1_2);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (!GLOBAL_GET("network/tls/enable_tls_v1.3").operator bool()) {
|
||||
mbedtls_ssl_conf_max_tls_version(&conf, MBEDTLS_SSL_VERSION_TLS1_2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
if interface and interface.initialize():
|
||||
get_viewport().use_xr = true
|
||||
[/codeblock]
|
||||
[b]Note:[/b] For Android, [member ProjectSettings.input_devices/sensors/enable_accelerometer], [member ProjectSettings.input_devices/sensors/enable_gravity], [member ProjectSettings.input_devices/sensors/enable_gyroscope] and [member ProjectSettings.input_devices/sensors/enable_magnetometer] must be enabled.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS)(HANDLE, PBOOL);
|
|||
BOOL is_wow64() {
|
||||
BOOL wow64 = FALSE;
|
||||
|
||||
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process");
|
||||
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)(void *)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process");
|
||||
|
||||
if (fnIsWow64Process) {
|
||||
if (!fnIsWow64Process(GetCurrentProcess(), &wow64)) {
|
||||
|
|
|
|||
|
|
@ -3641,10 +3641,10 @@ void OpenXRAPI::set_emulate_environment_blend_mode_alpha_blend(bool p_enabled) {
|
|||
}
|
||||
|
||||
OpenXRAPI::OpenXRAlphaBlendModeSupport OpenXRAPI::is_environment_blend_mode_alpha_blend_supported() {
|
||||
if (is_environment_blend_mode_supported(XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND)) {
|
||||
return OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL;
|
||||
} else if (emulate_environment_blend_mode_alpha_blend) {
|
||||
if (emulate_environment_blend_mode_alpha_blend) {
|
||||
return OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING;
|
||||
} else if (is_environment_blend_mode_supported(XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND)) {
|
||||
return OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL;
|
||||
}
|
||||
return OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue