Use memory pools to allocate nodes, renderers, materials and animations
[platform/core/uifw/dali-core.git] / dali / internal / update / rendering / scene-graph-material.h
index 743d516..01072db 100644 (file)
@@ -61,9 +61,9 @@ public:
   };
 
   /**
-   * Constructor
+   * Construct a new Material.
    */
-  Material();
+  static Material* New();
 
   /**
    * Destructor
@@ -71,6 +71,12 @@ public:
   virtual ~Material();
 
   /**
+   * Overriden delete operator
+   * Deletes the material from its global memory pool
+   */
+  void operator delete( void* ptr );
+
+  /**
    * Prepare material, check texture loading status, opacity etc
    * @param resourceManager for checking texture details and loading status
    */
@@ -270,6 +276,13 @@ public: // ConnectionChangePropagator::Observer
    */
   virtual void ConnectedUniformMapChanged();
 
+private:
+
+  /**
+   * Protected constructor; See also Material::New()
+   */
+   Material();
+
 private: // Data
 
   Shader*                         mShader;