fix shader binary compilation to work with lazy compilation
[platform/core/uifw/dali-core.git] / dali / internal / render / shaders / program.h
index ab7cc6e..af24326 100644 (file)
@@ -139,7 +139,7 @@ public:
    * @param [in] modifiesGeometry True if the shader modifies geometry
    * @return pointer to the program
    */
-  static Program* New( const Integration::ResourceId& resourceId, Integration::ShaderData* shaderData, Context& context, bool modifiesGeometry );
+  static Program* New( const Integration::ResourceId& resourceId, Integration::ShaderDataPtr shaderData, Context& context, bool modifiesGeometry );
 
   /**
    * Takes this program into use
@@ -296,11 +296,11 @@ private: // Implementation
 
   /**
    * Constructor, private so no direct instantiation
-   * @param[in] shaderData A pointer to a data structure containing the program source and binary
+   * @param[in] shaderData A smart pointer to a data structure containing the program source and binary
    * @param[in] context    The GL context state cache.
    * @param[in] modifiesGeometry True if the vertex shader changes geometry
    */
-  Program( Integration::ShaderData* shaderData, Context& context, bool modifiesGeometry );
+  Program( Integration::ShaderDataPtr shaderData, Context& context, bool modifiesGeometry );
 
 public:
 
@@ -309,6 +309,11 @@ public:
    */
   ~Program();
 
+  /**
+   * Load the shader, from a precompiled binary if available, else from source code
+   */
+  void Load();
+
 private:
 
   // default constructor, not defined
@@ -317,11 +322,6 @@ private:
   Program& operator=( const Program& );
 
   /**
-   * Load the shader, from a precompiled binary if available, else from source code
-   */
-  void Load();
-
-  /**
    * Unload the shader
    */
   void Unload();
@@ -348,7 +348,7 @@ private:
   /**
    * Resets caches
    */
-  void ResetAttribsUniforms();
+  void ResetAttribsUniformCache();
 
 private:  // Data