diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-14 23:17:15 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-14 23:17:15 +0300 |
commit | d6998995b54fd4fed83eef9db3bbb45fa60565db (patch) | |
tree | 927e4e2441db1c62b3853d03f3ed4bb996881045 /scene/resources/shader.h | |
parent | b6c5cb1064eab63788060dc918d7fec53e57a532 (diff) | |
parent | 04af74596d070f062bd917b0364d87c57544f8d5 (diff) |
Merge branch 'master' of github.com:okamstudio/godot
Conflicts:
platform/x11/detect.py
Diffstat (limited to 'scene/resources/shader.h')
-rw-r--r-- | scene/resources/shader.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scene/resources/shader.h b/scene/resources/shader.h index 8c15ca43d4..4a380d455b 100644 --- a/scene/resources/shader.h +++ b/scene/resources/shader.h @@ -80,6 +80,16 @@ public: Ref<Texture> get_default_texture_param(const StringName& p_param) const; void get_default_texture_param_list(List<StringName>* r_textures) const; + _FORCE_INLINE_ StringName remap_param(const StringName& p_param) const { + if (params_cache_dirty) + get_param_list(NULL); + + const Map<StringName,StringName>::Element *E=params_cache.find(p_param); + if (E) + return E->get(); + return StringName(); + } + virtual RID get_rid() const; Shader(Mode p_mode); @@ -98,6 +108,15 @@ public: MaterialShader() : Shader(MODE_MATERIAL) {}; }; +class CanvasItemShader : public Shader { + + OBJ_TYPE(CanvasItemShader,Shader); + +public: + + CanvasItemShader() : Shader(MODE_CANVAS_ITEM) {}; +}; + class ResourceFormatLoaderShader : public ResourceFormatLoader { |