summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-24 09:52:31 +0100
committerGitHub <noreply@github.com>2019-01-24 09:52:31 +0100
commit6d224e64437b748a92c59dcffe5a074339f3b497 (patch)
treee155891c40dbe2449b4b2afe87860afcadd12f5e /scene/resources
parent2d57ec24609687756597cce1e47ea4712dea2666 (diff)
parent0577f93cf661c694a41787e1a88252610df74ed2 (diff)
Merge pull request #25270 from groud/fix_texture_update
Fixing textures not triggering _change_notify
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/texture.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 4984af57b5..3870916779 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -185,6 +185,7 @@ void ImageTexture::create(int p_width, int p_height, Image::Format p_format, uin
format = p_format;
w = p_width;
h = p_height;
+ _change_notify();
}
void ImageTexture::create_from_image(const Ref<Image> &p_image, uint32_t p_flags) {
@@ -211,6 +212,7 @@ void ImageTexture::set_flags(uint32_t p_flags) {
return; //uninitialized, do not set to texture
}
VisualServer::get_singleton()->texture_set_flags(texture, p_flags);
+ _change_notify("flags");
}
uint32_t ImageTexture::get_flags() const {
@@ -712,6 +714,7 @@ Error StreamTexture::load(const String &p_path) {
path_to_file = p_path;
format = image->get_format();
+ _change_notify();
return OK;
}
String StreamTexture::get_load_path() const {
@@ -801,6 +804,7 @@ bool StreamTexture::is_pixel_opaque(int p_x, int p_y) const {
void StreamTexture::set_flags(uint32_t p_flags) {
flags = p_flags;
VS::get_singleton()->texture_set_flags(texture, flags);
+ _change_notify("flags");
}
void StreamTexture::reload_from_file() {