diff options
author | Bil Bas (Spooner) <bil.bagpuss@gmail.com> | 2015-02-01 20:29:11 +0000 |
---|---|---|
committer | Bil Bas (Spooner) <bil.bagpuss@gmail.com> | 2015-02-01 20:29:11 +0000 |
commit | 2c1a3dfed6f9a474ace9123b46edca77be548d3e (patch) | |
tree | e1cd0db9257a5a241a1db3906041dbb9c1295c74 /scene/resources/shader.h | |
parent | af7c8bdf236b7c572bc33a44e3bb64fecdaa99d9 (diff) | |
parent | 67d357191ff74b2cfc80015941363a97e7ee19fd (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot into add_sprintf
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 { |