Merge pull request #96099 from NotWearingPants/patch-1

NoiseTexture2D/3D: Don't use a thread to regenerate when the build doesn't support threads
This commit is contained in:
Rémi Verschelde 2024-09-03 11:43:27 +02:00
commit 4d3f1db954
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 6 additions and 0 deletions

View File

@ -194,6 +194,9 @@ Ref<Image> NoiseTexture2D::_modulate_with_gradient(Ref<Image> p_image, Ref<Gradi
void NoiseTexture2D::_update_texture() {
bool use_thread = true;
#ifndef THREADS_ENABLED
use_thread = false;
#endif
if (first_time) {
use_thread = false;
first_time = false;

View File

@ -187,6 +187,9 @@ Ref<Image> NoiseTexture3D::_modulate_with_gradient(Ref<Image> p_image, Ref<Gradi
void NoiseTexture3D::_update_texture() {
bool use_thread = true;
#ifndef THREADS_ENABLED
use_thread = false;
#endif
if (first_time) {
use_thread = false;
first_time = false;