summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-02 13:53:28 +0200
committerGitHub <noreply@github.com>2018-10-02 13:53:28 +0200
commit0f4c30fb7166e84d93f0b2cb20d726f869155d98 (patch)
tree252b5bcf68b109de8d056e5b65fa31c76fdda8b3
parent88a14949dda474fd8fa5be6b4be527cd0a56f6cd (diff)
parent8f89e2b4902f9de1982fad014e490cc227322c73 (diff)
Merge pull request #22531 from DualMatrix/path_missing_video_memory
Made Debugger's Video Memory tab show correct resource paths.
-rw-r--r--scene/resources/texture.cpp9
-rw-r--r--scene/resources/texture.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index f0e3979f13..682bfebdd2 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -426,6 +426,15 @@ ImageTexture::~ImageTexture() {
//////////////////////////////////////////
+void StreamTexture::set_path(const String &p_path, bool p_take_over) {
+
+ if (texture.is_valid()) {
+ VisualServer::get_singleton()->texture_set_path(texture, p_path);
+ }
+
+ Resource::set_path(p_path, p_take_over);
+}
+
void StreamTexture::_requested_3d(void *p_ud) {
StreamTexture *st = (StreamTexture *)p_ud;
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index cb759c63da..e9b69e9cb1 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -219,6 +219,8 @@ public:
int get_height() const;
virtual RID get_rid() const;
+ virtual void set_path(const String &p_path, bool p_take_over);
+
virtual void draw(RID p_canvas_item, const Point2 &p_pos, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, const Ref<Texture> &p_normal_map = Ref<Texture>()) const;
virtual void draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, const Ref<Texture> &p_normal_map = Ref<Texture>()) const;
virtual void draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, const Ref<Texture> &p_normal_map = Ref<Texture>(), bool p_clip_uv = true) const;