mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
NoiseTexture2D/3D: Don't use a thread to regenerate when the build doesn't support threads
This commit is contained in:
parent
7c383767a2
commit
b47b98db34
@ -194,6 +194,9 @@ Ref<Image> NoiseTexture2D::_modulate_with_gradient(Ref<Image> p_image, Ref<Gradi
|
|||||||
|
|
||||||
void NoiseTexture2D::_update_texture() {
|
void NoiseTexture2D::_update_texture() {
|
||||||
bool use_thread = true;
|
bool use_thread = true;
|
||||||
|
#ifndef THREADS_ENABLED
|
||||||
|
use_thread = false;
|
||||||
|
#endif
|
||||||
if (first_time) {
|
if (first_time) {
|
||||||
use_thread = false;
|
use_thread = false;
|
||||||
first_time = false;
|
first_time = false;
|
||||||
|
@ -187,6 +187,9 @@ Ref<Image> NoiseTexture3D::_modulate_with_gradient(Ref<Image> p_image, Ref<Gradi
|
|||||||
|
|
||||||
void NoiseTexture3D::_update_texture() {
|
void NoiseTexture3D::_update_texture() {
|
||||||
bool use_thread = true;
|
bool use_thread = true;
|
||||||
|
#ifndef THREADS_ENABLED
|
||||||
|
use_thread = false;
|
||||||
|
#endif
|
||||||
if (first_time) {
|
if (first_time) {
|
||||||
use_thread = false;
|
use_thread = false;
|
||||||
first_time = false;
|
first_time = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user