Skip to content

Commit

Permalink
Merge pull request #96099 from NotWearingPants/patch-1
Browse files Browse the repository at this point in the history
NoiseTexture2D/3D: Don't use a thread to regenerate when the build doesn't support threads
  • Loading branch information
akien-mga committed Sep 3, 2024
2 parents 1914ca6 + b47b98d commit 4d3f1db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/noise/noise_texture_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions modules/noise/noise_texture_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d3f1db

Please sign in to comment.