summaryrefslogtreecommitdiffstats
path: root/modules/noise
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-12-18 15:46:56 +0100
committerkobewi <kobewi4e@gmail.com>2024-01-09 16:11:47 +0100
commit0e8f90f4c8b4b353d3ac372e5f00493a2f0bd136 (patch)
tree9b83683d86b94f9fdf7d6d58594d2b28d88a13ab /modules/noise
parent8297ec949bad8029372da13e1d4e36599989b5ae (diff)
downloadredot-engine-0e8f90f4c8b4b353d3ac372e5f00493a2f0bd136.tar.gz
Update deferred calls to use Callables
Diffstat (limited to 'modules/noise')
-rw-r--r--modules/noise/noise_texture_2d.cpp8
-rw-r--r--modules/noise/noise_texture_3d.cpp8
2 files changed, 4 insertions, 12 deletions
diff --git a/modules/noise/noise_texture_2d.cpp b/modules/noise/noise_texture_2d.cpp
index 1b0c5cb9e3..0443fec4a0 100644
--- a/modules/noise/noise_texture_2d.cpp
+++ b/modules/noise/noise_texture_2d.cpp
@@ -49,10 +49,6 @@ NoiseTexture2D::~NoiseTexture2D() {
}
void NoiseTexture2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_texture"), &NoiseTexture2D::_update_texture);
- ClassDB::bind_method(D_METHOD("_generate_texture"), &NoiseTexture2D::_generate_texture);
- ClassDB::bind_method(D_METHOD("_thread_done", "image"), &NoiseTexture2D::_thread_done);
-
ClassDB::bind_method(D_METHOD("set_width", "width"), &NoiseTexture2D::set_width);
ClassDB::bind_method(D_METHOD("set_height", "height"), &NoiseTexture2D::set_height);
@@ -138,7 +134,7 @@ void NoiseTexture2D::_thread_done(const Ref<Image> &p_image) {
void NoiseTexture2D::_thread_function(void *p_ud) {
NoiseTexture2D *tex = static_cast<NoiseTexture2D *>(p_ud);
- tex->call_deferred(SNAME("_thread_done"), tex->_generate_texture());
+ callable_mp(tex, &NoiseTexture2D::_thread_done).call_deferred(tex->_generate_texture());
}
void NoiseTexture2D::_queue_update() {
@@ -147,7 +143,7 @@ void NoiseTexture2D::_queue_update() {
}
update_queued = true;
- call_deferred(SNAME("_update_texture"));
+ callable_mp(this, &NoiseTexture2D::_update_texture).call_deferred();
}
Ref<Image> NoiseTexture2D::_generate_texture() {
diff --git a/modules/noise/noise_texture_3d.cpp b/modules/noise/noise_texture_3d.cpp
index 33e257a5c2..f2e01b0612 100644
--- a/modules/noise/noise_texture_3d.cpp
+++ b/modules/noise/noise_texture_3d.cpp
@@ -49,10 +49,6 @@ NoiseTexture3D::~NoiseTexture3D() {
}
void NoiseTexture3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_texture"), &NoiseTexture3D::_update_texture);
- ClassDB::bind_method(D_METHOD("_generate_texture"), &NoiseTexture3D::_generate_texture);
- ClassDB::bind_method(D_METHOD("_thread_done", "image"), &NoiseTexture3D::_thread_done);
-
ClassDB::bind_method(D_METHOD("set_width", "width"), &NoiseTexture3D::set_width);
ClassDB::bind_method(D_METHOD("set_height", "height"), &NoiseTexture3D::set_height);
ClassDB::bind_method(D_METHOD("set_depth", "depth"), &NoiseTexture3D::set_depth);
@@ -126,7 +122,7 @@ void NoiseTexture3D::_thread_done(const TypedArray<Image> &p_data) {
void NoiseTexture3D::_thread_function(void *p_ud) {
NoiseTexture3D *tex = static_cast<NoiseTexture3D *>(p_ud);
- tex->call_deferred(SNAME("_thread_done"), tex->_generate_texture());
+ callable_mp(tex, &NoiseTexture3D::_thread_done).call_deferred(tex->_generate_texture());
}
void NoiseTexture3D::_queue_update() {
@@ -135,7 +131,7 @@ void NoiseTexture3D::_queue_update() {
}
update_queued = true;
- call_deferred(SNAME("_update_texture"));
+ callable_mp(this, &NoiseTexture3D::_update_texture).call_deferred();
}
TypedArray<Image> NoiseTexture3D::_generate_texture() {