summaryrefslogtreecommitdiff
path: root/scene/2d/canvas_item.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/canvas_item.h')
-rw-r--r--scene/2d/canvas_item.h38
1 files changed, 3 insertions, 35 deletions
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index a188ce495a..a5074991da 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -41,38 +41,6 @@ class Font;
class StyleBox;
-class CanvasItemMaterial : public Material {
-
- GDCLASS(CanvasItemMaterial, Material);
- Ref<Shader> shader;
-
-public:
- /*enum ShadingMode {
- SHADING_NORMAL,
- SHADING_UNSHADED,
- SHADING_ONLY_LIGHT,
- };*/
-
-protected:
- bool _set(const StringName &p_name, const Variant &p_value);
- bool _get(const StringName &p_name, Variant &r_ret) const;
- void _get_property_list(List<PropertyInfo> *p_list) const;
-
- static void _bind_methods();
-
- void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
-
-public:
- void set_shader(const Ref<Shader> &p_shader);
- Ref<Shader> get_shader() const;
-
- void set_shader_param(const StringName &p_param, const Variant &p_value);
- Variant get_shader_param(const StringName &p_param) const;
-
- CanvasItemMaterial();
- ~CanvasItemMaterial();
-};
-
class CanvasItem : public Node {
GDCLASS(CanvasItem, Node);
@@ -114,7 +82,7 @@ private:
bool notify_local_transform;
bool notify_transform;
- Ref<CanvasItemMaterial> material;
+ Ref<ShaderMaterial> material;
mutable Transform2D global_transform;
mutable bool global_invalid;
@@ -234,8 +202,8 @@ public:
RID get_canvas() const;
Ref<World2D> get_world_2d() const;
- void set_material(const Ref<CanvasItemMaterial> &p_material);
- Ref<CanvasItemMaterial> get_material() const;
+ void set_material(const Ref<ShaderMaterial> &p_material);
+ Ref<ShaderMaterial> get_material() const;
void set_use_parent_material(bool p_use_parent_material);
bool get_use_parent_material() const;