summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorMarianoGNU <marianognu.easyrpg@gmail.com>2015-10-24 11:55:00 -0300
committerMarianoGNU <marianognu.easyrpg@gmail.com>2015-10-24 11:55:00 -0300
commit754908844ae52c04ed68ef27c02481479f1e2ab4 (patch)
tree90b95accfabc9bc12a6479c004183ff7d28b6fcd /servers/visual
parent6df7d923797908ecf38684c0008c0e4b6475d884 (diff)
parent4baf65dab78b6e8062de760010338c316c628394 (diff)
Merge branch 'master' of https://github.com/okamstudio/godot into posta
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/rasterizer.h5
-rw-r--r--servers/visual/rasterizer_dummy.h4
-rw-r--r--servers/visual/visual_server_raster.cpp15
-rw-r--r--servers/visual/visual_server_raster.h5
-rw-r--r--servers/visual/visual_server_wrap_mt.h9
5 files changed, 37 insertions, 1 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 15c757665b..e22b3c3a6c 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -190,9 +190,12 @@ public:
virtual bool texture_has_alpha(RID p_texture) const=0;
virtual void texture_set_size_override(RID p_texture,int p_width, int p_height)=0;
-
virtual void texture_set_reload_hook(RID p_texture,ObjectID p_owner,const StringName& p_function) const=0;
+ virtual void texture_set_path(RID p_texture,const String& p_path)=0;
+ virtual String texture_get_path(RID p_texture) const=0;
+ virtual void texture_debug_usage(List<VS::TextureInfo> *r_info)=0;
+
/* SHADER API */
virtual RID shader_create(VS::ShaderMode p_mode=VS::SHADER_MATERIAL)=0;
diff --git a/servers/visual/rasterizer_dummy.h b/servers/visual/rasterizer_dummy.h
index 9249ad6256..f582fbd8ee 100644
--- a/servers/visual/rasterizer_dummy.h
+++ b/servers/visual/rasterizer_dummy.h
@@ -415,6 +415,10 @@ public:
virtual void texture_set_size_override(RID p_texture,int p_width, int p_height);
virtual void texture_set_reload_hook(RID p_texture,ObjectID p_owner,const StringName& p_function) const;
+ virtual void texture_set_path(RID p_texture,const String& p_path) {}
+ virtual String texture_get_path(RID p_texture) const { return String(); }
+ virtual void texture_debug_usage(List<VS::TextureInfo> *r_info) {}
+
/* SHADER API */
virtual RID shader_create(VS::ShaderMode p_mode=VS::SHADER_MATERIAL);
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 01af2d86ad..a94d4f64c7 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -112,6 +112,21 @@ void VisualServerRaster::texture_set_reload_hook(RID p_texture,ObjectID p_owner,
rasterizer->texture_set_reload_hook(p_texture,p_owner,p_function);
}
+void VisualServerRaster::texture_set_path(RID p_texture,const String& p_path) {
+
+ rasterizer->texture_set_path(p_texture,p_path);
+}
+
+String VisualServerRaster::texture_get_path(RID p_texture) const{
+
+ return rasterizer->texture_get_path(p_texture);
+}
+
+void VisualServerRaster::texture_debug_usage(List<TextureInfo> *r_info){
+
+ rasterizer->texture_debug_usage(r_info);
+}
+
/* SHADER API */
RID VisualServerRaster::shader_create(ShaderMode p_mode) {
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 3d8331984a..b6a5ca6308 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -668,6 +668,11 @@ public:
virtual bool texture_can_stream(RID p_texture) const;
virtual void texture_set_reload_hook(RID p_texture,ObjectID p_owner,const StringName& p_function) const;
+ virtual void texture_set_path(RID p_texture,const String& p_path);
+ virtual String texture_get_path(RID p_texture) const;
+
+ virtual void texture_debug_usage(List<TextureInfo> *r_info);
+
/* SHADER API */
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index af88c9bdc9..57d691ae68 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -98,6 +98,15 @@ public:
FUNC1RC(bool,texture_can_stream,RID);
FUNC3C(texture_set_reload_hook,RID,ObjectID,const StringName&);
+ FUNC2(texture_set_path,RID,const String&);
+ FUNC1RC(String,texture_get_path,RID);
+
+ virtual void texture_debug_usage(List<TextureInfo> *r_info) {
+ //pass directly, should lock the server anyway
+ visual_server->texture_debug_usage(r_info);
+ }
+
+
/* SHADER API */
FUNC1R(RID,shader_create,ShaderMode);