Add renderer API and required glue. 52/36752/5
authorFrancisco Santos <f1.santos@samsung.com>
Thu, 12 Mar 2015 19:37:23 +0000 (19:37 +0000)
committerFrancisco Santos <f1.santos@samsung.com>
Tue, 17 Mar 2015 14:05:06 +0000 (14:05 +0000)
Change-Id: I1c2718aff755128b6e4a224373381b1c3c72738c

17 files changed:
dali/internal/event/actor-attachments/renderer-attachment-impl.cpp [new file with mode: 0644]
dali/internal/event/actor-attachments/renderer-attachment-impl.h [new file with mode: 0644]
dali/internal/event/actors/actor-impl.cpp
dali/internal/event/actors/actor-impl.h
dali/internal/event/effects/shader-effect-impl.cpp
dali/internal/file.list
dali/public-api/actors/actor.cpp
dali/public-api/actors/actor.h
dali/public-api/actors/renderer.cpp
dali/public-api/actors/renderer.h
dali/public-api/geometry/geometry.cpp
dali/public-api/geometry/geometry.h
dali/public-api/object/property-buffer.h
dali/public-api/shader-effects/material.cpp
dali/public-api/shader-effects/material.h
dali/public-api/shader-effects/sampler.cpp
dali/public-api/shader-effects/sampler.h

diff --git a/dali/internal/event/actor-attachments/renderer-attachment-impl.cpp b/dali/internal/event/actor-attachments/renderer-attachment-impl.cpp
new file mode 100644 (file)
index 0000000..c940c3e
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/event/actor-attachments/renderer-attachment-impl.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/update/node-attachments/scene-graph-renderer-attachment.h>
+#include <dali/internal/event/common/stage-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+RendererAttachmentPtr RendererAttachment::New( Stage& stage, const SceneGraph::Node& parentNode, Renderer& renderer )
+{
+  RendererAttachmentPtr attachment( new RendererAttachment( stage ) );
+
+  // Transfer object ownership of scene-object to message
+  SceneGraph::RendererAttachment* sceneObject = CreateSceneObject();
+  AttachToNodeMessage( stage.GetUpdateManager(), parentNode, sceneObject );
+
+  // Keep raw pointer for message passing
+  attachment->mSceneObject = sceneObject;
+
+  return attachment;
+}
+
+RendererAttachment::RendererAttachment( Stage& stage )
+: RenderableAttachment(stage),
+  mSceneObject(NULL)
+{
+}
+
+RendererAttachment::~RendererAttachment()
+{
+}
+
+SceneGraph::RendererAttachment* RendererAttachment::CreateSceneObject()
+{
+  return SceneGraph::RendererAttachment::New();
+}
+
+const SceneGraph::RendererAttachment& RendererAttachment::GetSceneObject() const
+{
+  DALI_ASSERT_DEBUG( mSceneObject != NULL );
+  return *mSceneObject;
+}
+
+
+void RendererAttachment::OnStageConnection2()
+{
+  mRendererConnector.OnStageConnect();
+}
+
+void RendererAttachment::OnStageDisconnection2()
+{
+  mRendererConnector.OnStageDisconnect();
+}
+
+
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/event/actor-attachments/renderer-attachment-impl.h b/dali/internal/event/actor-attachments/renderer-attachment-impl.h
new file mode 100644 (file)
index 0000000..6fa5844
--- /dev/null
@@ -0,0 +1,113 @@
+#ifndef DALI_INTERNAL_RENDERER_ATTACHMENT_H
+#define DALI_INTERNAL_RENDERER_ATTACHMENT_H
+
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/internal/event/common/object-connector.h>
+#include <dali/internal/event/actors/renderer-impl.h>
+#include <dali/internal/event/actor-attachments/renderable-attachment-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace SceneGraph
+{
+class Node;
+class RendererAttachment;
+}
+
+class RendererAttachment;
+typedef IntrusivePtr<RendererAttachment>  RendererAttachmentPtr;
+
+/**
+ * An attachment for rendering renderers.
+ */
+class RendererAttachment : public RenderableAttachment
+{
+public:
+
+  /**
+   * Create a new RendererAttachment.
+   * @param[in] stage The stage to use for messaging
+   * @param[in] parentNode The node to attach a scene-object to.
+   * @poaram[in] renderer The renderer for this attachment
+   * @return A smart-pointer to the newly allocated RendererAttachment.
+   */
+  static RendererAttachmentPtr New( Stage& stage, const SceneGraph::Node& parentNode, Renderer& renderer );
+
+  /**
+   * Get the renderer
+   *
+   * @return The renderer
+   */
+  Renderer& GetRenderer()
+  {
+    return *mRendererConnector.Get();
+  }
+
+private:
+
+  /**
+   * First stage construction of a RendererAttachment.
+   * @param[in] stage Used to send messages to scene-graph.
+   */
+  RendererAttachment(Stage& stage);
+
+  /**
+   * Creates the corresponding scene-graph RendererAttachment.
+   * @return A newly allocated scene object.
+   */
+  static SceneGraph::RendererAttachment* CreateSceneObject();
+
+  /**
+   * @copydoc Dali::Internal::RenderableAttachment::GetSceneObject()
+   */
+  virtual const SceneGraph::RendererAttachment& GetSceneObject() const;
+
+  /**
+   * @copydoc Dali::Internal::RenderableAttachment::OnStageConnection2()
+   */
+  virtual void OnStageConnection2();
+
+  /**
+   * @copydoc Dali::Internal::RenderableAttachment::OnStageDisconnection2()
+   */
+  virtual void OnStageDisconnection2();
+
+protected:
+
+  /**
+   * A reference counted object may only be deleted by calling Unreference()
+   */
+  virtual ~RendererAttachment();
+
+private:
+  const SceneGraph::RendererAttachment* mSceneObject; ///< Not owned
+
+  ObjectConnector<Renderer> mRendererConnector;
+};
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_RENDERER_ATTACHMENT_H
index 40bacd6..02a942f 100644 (file)
@@ -39,6 +39,7 @@
 #include <dali/internal/event/common/property-helper.h>
 #include <dali/internal/event/common/stage-impl.h>
 #include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
+#include <dali/internal/event/actor-attachments/renderer-attachment-impl.h>
 #include <dali/internal/event/animation/constraint-impl.h>
 #include <dali/internal/event/common/projection.h>
 #include <dali/internal/update/common/animatable-property.h>
@@ -1141,6 +1142,52 @@ Vector3 Actor::GetNaturalSize() const
   return Vector3( 0.0f, 0.0f, 0.0f );
 }
 
+unsigned int Actor::AddRenderer( Renderer& renderer )
+{
+  //TODO: MESH_REWORK : Check this
+  //TODO: MESH_REWORK : Add support for multiple renderers
+  if ( ! mAttachment )
+  {
+    mAttachment = RendererAttachment::New( *mStage,  *mNode, renderer );
+  }
+
+  return 0;
+}
+
+unsigned int Actor::GetRendererCount() const
+{
+  //TODO: MESH_REWORK : Check this
+  //TODO: MESH_REWORK : Add support for multiple renderers
+  RendererAttachment* attachment = dynamic_cast<RendererAttachment*>(mAttachment.Get());
+  return attachment ? 1u : 0u;
+}
+
+Renderer& Actor::GetRendererAt( unsigned int index )
+{
+  //TODO: MESH_REWORK : Check this
+  //TODO: MESH_REWORK : Add support for multiple renderers
+  DALI_ASSERT_DEBUG( index == 0 && "Only one renderer is supported." );
+
+  //TODO: MESH_REWORK : Temporary code
+  RendererAttachment* attachment = dynamic_cast<RendererAttachment*>(mAttachment.Get());
+  DALI_ASSERT_ALWAYS( attachment && "Actor doesn't have a renderer" );
+
+  return attachment->GetRenderer();
+}
+
+void Actor::RemoveRenderer( Renderer& renderer )
+{
+  //TODO: MESH_REWORK : Check this
+  //TODO: MESH_REWORK : Add support for multiple renderers
+  mAttachment = NULL;
+}
+
+void Actor::RemoveRenderer( unsigned int index )
+{
+  //TODO: MESH_REWORK : Check this
+  //TODO: MESH_REWORK : Add support for multiple renderers
+  mAttachment = NULL;
+}
 
 #ifdef DYNAMICS_SUPPORT
 
index e9be9fc..c4ff197 100644 (file)
@@ -31,6 +31,7 @@
 #include <dali/internal/event/common/object-impl.h>
 #include <dali/internal/event/common/stage-def.h>
 #include <dali/internal/event/actors/actor-declarations.h>
+#include <dali/internal/event/actors/renderer-impl.h>
 #include <dali/internal/event/actor-attachments/actor-attachment-declarations.h>
 #include <dali/internal/update/nodes/node-declarations.h>
 
@@ -53,6 +54,7 @@ class Actor;
 class ActorGestureData;
 class Animation;
 class RenderTask;
+class Renderer;
 struct DynamicsData;
 
 typedef IntrusivePtr<Actor>                   ActorPtr;
@@ -743,6 +745,31 @@ public:
    */
   const Vector4& GetCurrentWorldColor() const;
 
+  /**
+   * @copydoc Dali::Actor::AddRenderer()
+   */
+  unsigned int AddRenderer( Renderer& renderer );
+
+  /**
+   * @copydoc Dali::Actor::GetRendererCount()
+   */
+  unsigned int GetRendererCount() const;
+
+  /**
+   * @copydoc Dali::Actor::GetRendererAt()
+   */
+  Renderer& GetRendererAt( unsigned int index );
+
+  /**
+   * @copydoc Dali::Actor::RemoveRenderer()
+   */
+  void RemoveRenderer( Renderer& renderer );
+
+  /**
+   * @copydoc Dali::Actor::RemoveRenderer()
+   */
+  void RemoveRenderer( unsigned int index );
+
 #ifdef DYNAMICS_SUPPORT
 
   // Dynamics
index 161e4bc..6d5267e 100644 (file)
@@ -218,7 +218,7 @@ ShaderEffect::ShaderEffect( UpdateManager& updateManager, Dali::ShaderEffect::Ge
   mConnectionCount (0),
   mGeometryHints( hints )
 {
-  mSceneObject = new Shader( hints );
+  mSceneObject = new SceneGraph::Shader( hints );
   DALI_ASSERT_DEBUG( NULL != mSceneObject );
 
   // Transfer shader ownership to a scene message
index 236959c..5d922f4 100644 (file)
@@ -13,6 +13,7 @@ internal_src_files = \
   $(internal_src_dir)/event/actor-attachments/camera-attachment-impl.cpp \
   $(internal_src_dir)/event/actor-attachments/image-attachment-impl.cpp \
   $(internal_src_dir)/event/actor-attachments/renderable-attachment-impl.cpp \
+  $(internal_src_dir)/event/actor-attachments/renderer-attachment-impl.cpp \
   $(internal_src_dir)/event/actor-attachments/text-attachment-impl.cpp \
   $(internal_src_dir)/event/actors/actor-impl.cpp \
   $(internal_src_dir)/event/actors/custom-actor-internal.cpp \
@@ -45,9 +46,9 @@ internal_src_files = \
   $(internal_src_dir)/event/common/type-registry-impl.cpp \
   $(internal_src_dir)/event/effects/material-impl.cpp \
   $(internal_src_dir)/event/effects/sampler-impl.cpp \
-  $(internal_src_dir)/event/effects/shader-impl.cpp \
   $(internal_src_dir)/event/effects/shader-effect-impl.cpp \
   $(internal_src_dir)/event/effects/shader-factory.cpp \
+  $(internal_src_dir)/event/effects/shader-impl.cpp \
   $(internal_src_dir)/event/events/actor-gesture-data.cpp \
   $(internal_src_dir)/event/events/actor-observer.cpp \
   $(internal_src_dir)/event/events/event-processor.cpp \
index f2c07d6..25a91a6 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
+#include <dali/internal/event/actors/renderer-impl.h>
 #include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
 #include <dali/internal/event/animation/constraint-impl.h>
 
@@ -517,6 +518,31 @@ Actor::OffStageSignalType& Actor::OffStageSignal()
   return GetImplementation(*this).OffStageSignal();
 }
 
+unsigned int Actor::AddRenderer( Renderer& renderer )
+{
+  return GetImplementation(*this).AddRenderer( GetImplementation( renderer ) );
+}
+
+unsigned int Actor::GetRendererCount() const
+{
+  return GetImplementation(*this).GetRendererCount();
+}
+
+Renderer Actor::GetRendererAt( unsigned int index )
+{
+  return Renderer( &GetImplementation(*this).GetRendererAt( index ) );
+}
+
+void Actor::RemoveRenderer( Renderer& renderer )
+{
+  GetImplementation(*this).RemoveRenderer( GetImplementation( renderer ) );
+}
+
+void Actor::RemoveRenderer( unsigned int index )
+{
+  GetImplementation(*this).RemoveRenderer( index );
+}
+
 DynamicsBody Actor::EnableDynamics(DynamicsBodyConfig bodyConfig)
 {
 #ifdef DYNAMICS_SUPPORT
index c0cef0a..b4dabbc 100644 (file)
@@ -30,7 +30,6 @@
 #include <dali/public-api/object/handle.h>
 #include <dali/public-api/object/property-index-ranges.h>
 #include <dali/public-api/signals/dali-signal.h>
-
 namespace Dali
 {
 
@@ -40,6 +39,7 @@ class Actor;
 }
 
 class Actor;
+class Renderer;
 class Animation;
 class Constraint;
 struct Degree;
@@ -1299,6 +1299,51 @@ public: // Signals
    */
   OffStageSignalType& OffStageSignal();
 
+public: // Renderer
+
+  /**
+   * @brief Add a renderer to this actor.
+   *
+   * @pre The renderer must be initialized.
+   *
+   * @param[in] renderer Renderer to add to the actor
+   * @return The index of the Renderer that was added
+   */
+  unsigned int AddRenderer( Renderer& renderer );
+
+  /**
+   * @brief Get the number of renderers on this actor.
+   *
+   * @return the number of renderers on this actor
+   */
+  unsigned int GetRendererCount() const;
+
+  /**
+   * @brief Get a Renderer by index.
+   *
+   * @pre The index must be between 0 and GetRendererCount()-1
+   *
+   * @param[in] renderer Renderer to add to the actor
+   * @return The renderer at the specified index
+   */
+  Renderer GetRendererAt( unsigned int index );
+
+  /**
+   * @brief Remove an renderer from the actor.
+   *
+   * @param[in] renderer Handle to the renderer that is to be removed
+   */
+  void RemoveRenderer( Renderer& renderer );
+
+  /**
+   * @brief Remove an renderer from the actor by index.
+   *
+   * @pre The index must be between 0 and GetRendererCount()-1
+   *
+   * @param[in] index Index of the renderer that is to be removed
+   */
+  void RemoveRenderer( unsigned int index );
+
 public: // Dynamics
 
   /**
index 64f3a03..ba68a8d 100644 (file)
@@ -24,7 +24,7 @@
 namespace Dali
 {
 
-Renderer Renderer::New( Geometry geometry, Material material )
+Renderer Renderer::New( Geometry& geometry, Material& material )
 {
   Internal::RendererPtr renderer = Internal::Renderer::New(  );
   return Renderer( renderer.Get() );
@@ -49,12 +49,12 @@ Renderer& Renderer::operator=( const Renderer& handle )
   return *this;
 }
 
-void Renderer::SetGeometry( Geometry geometry )
+void Renderer::SetGeometry( Geometry& geometry )
 {
   GetImplementation(*this).SetGeometry( GetImplementation(geometry) );
 }
 
-void Renderer::SetMaterial( Material material )
+void Renderer::SetMaterial( Material& material )
 {
   GetImplementation(*this).SetMaterial( GetImplementation(material) );
 }
index c9a781f..afaca58 100644 (file)
@@ -59,7 +59,7 @@ public:
    * @param[in] geometry Geometry to be used by this renderer
    * @param[in] material Material to be used by this renderer
    */
-  static Renderer New( Geometry geometry, Material material );
+  static Renderer New( Geometry& geometry, Material& material );
 
   /**
    * @brief Default constructor, creates an empty handle
@@ -91,14 +91,14 @@ public:
    *
    * @param[in] geometry The geometry to be used by this renderer
    */
-  void SetGeometry( Geometry geometry );
+  void SetGeometry( Geometry& geometry );
 
   /**
    * @brief Sets the material to be used by this renderer
    *
    * @param[in] material The material to be used by this renderer
    */
-  void SetMaterial( Material material );
+  void SetMaterial( Material& material );
 
   /**
    * @brief Set the depth index of this renderer
index c9351a4..2ed3b74 100644 (file)
@@ -49,7 +49,7 @@ Geometry& Geometry::operator=( const Geometry& handle )
   return *this;
 }
 
-std::size_t Geometry::AddVertexBuffer( PropertyBuffer vertexBuffer )
+std::size_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
 {
   return GetImplementation(*this).AddVertexBuffer( GetImplementation( vertexBuffer ) );
 }
@@ -64,7 +64,7 @@ void Geometry::RemoveVertexBuffer( std::size_t index )
   GetImplementation(*this).RemoveVertexBuffer( index );
 }
 
-void Geometry::SetIndexBuffer( PropertyBuffer indexBuffer )
+void Geometry::SetIndexBuffer( PropertyBuffer& indexBuffer )
 {
   GetImplementation(*this).SetIndexBuffer( GetImplementation( indexBuffer ) );
 }
index 0ee2a8b..342fe6f 100644 (file)
@@ -105,7 +105,7 @@ public:
    * @return Index of the newly added buffer, can be used with RemoveVertexBuffer to remove
    *         this buffer if no longer required
    */
-  std::size_t AddVertexBuffer( PropertyBuffer vertexBuffer );
+  std::size_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
 
   /**
    * @brief Retrieve the number of vertex buffers that have been added to this geometry
@@ -133,7 +133,7 @@ public:
    *
    * @param[in] indexBuffer PropertyBuffer to be used as a source of indices for the geometry
    */
-  void SetIndexBuffer( PropertyBuffer indexBuffer );
+  void SetIndexBuffer( PropertyBuffer& indexBuffer );
 
   /**
    * @brief Set the type of primitives this geometry contains
@@ -175,7 +175,7 @@ public:
    *
    * @param [in] pointer A pointer to a newly allocated Geometry
    */
-  explicit DALI_INTERNAL Geometry(Internal::Geometry* pointer);
+  explicit DALI_INTERNAL Geometry( Internal::Geometry* pointer );
 };
 
 } //namespace Dali
index 35e49d3..cd466d9 100644 (file)
@@ -159,7 +159,7 @@ public:
    *
    * @param [in] pointer A pointer to a newly allocated PropertyBuffer
    */
-  explicit DALI_INTERNAL PropertyBuffer(Internal::PropertyBuffer* pointer);
+  explicit DALI_INTERNAL PropertyBuffer( Internal::PropertyBuffer* pointer );
 };
 
 } // namespace Dali
index f4755d5..699898e 100644 (file)
@@ -28,6 +28,7 @@ namespace Dali
 
 Material Material::New( Shader shader )
 {
+  // TODO: MESH_REWORK
   Internal::MaterialPtr material = Internal::Material::New();
   return Material( material.Get() );
 }
@@ -45,18 +46,18 @@ Material::Material( const Material& handle )
 {
 }
 
-Material& Material::operator=( Material& handle )
+Material& Material::operator=( const Material& handle )
 {
   BaseHandle::operator=( handle );
   return *this;
 }
 
-void Material::SetShader( Shader shader )
+void Material::SetShader( Shader& shader )
 {
   GetImplementation(*this).SetShader( GetImplementation( shader ) );
 }
 
-void Material::AddSampler( Sampler sampler )
+void Material::AddSampler( Sampler& sampler )
 {
   GetImplementation(*this).AddSampler( GetImplementation( sampler ) );
 }
index 1a79444..8a64bf0 100644 (file)
@@ -112,21 +112,21 @@ public:
    *
    * @param[in] handle Handle to an object
    */
-  Material& operator=( Material& handle );
+  Material& operator=( const Material& handle );
 
   /**
    * @brief Sets the Shader used by this material
    *
    * @param[in] shader Handle to a shader
    */
-  void SetShader( Shader shader );
+  void SetShader( Shader& shader );
 
   /**
    * @brief Add a sampler to this material
    *
    * param[in] sampler The sampler to add to this material
    */
-  void AddSampler( Sampler sampler );
+  void AddSampler( Sampler& sampler );
 
   /**
    * @brief Get the number of samplers
@@ -270,7 +270,7 @@ public:
    *
    * @param [in] pointer A pointer to a newly allocated Material
    */
-  explicit DALI_INTERNAL Material(Internal::Material* pointer);
+  explicit DALI_INTERNAL Material( Internal::Material* pointer );
 };
 
 } //namespace Dali
index ca0ed29..f56678e 100644 (file)
@@ -24,8 +24,9 @@
 namespace Dali
 {
 
-Sampler Sampler::New( const std::string& uniformName )
+Sampler Sampler::New( Image& image, const std::string& uniformName )
 {
+  //TODO: MESH_REWORK
   Internal::SamplerPtr sampler = Internal::Sampler::New();
   return Sampler( sampler.Get() );
 }
@@ -54,7 +55,7 @@ void Sampler::SetUniformName( const std::string& name )
   GetImplementation(*this).SetUniformName( name );
 }
 
-void Sampler::SetImage( Image image )
+void Sampler::SetImage( Image& image )
 {
   GetImplementation(*this).SetImage( GetImplementation( image ) );
 }
index 9ab8c01..857fc21 100644 (file)
@@ -82,9 +82,10 @@ public:
   /**
    * @brief Creates a new Sampler object
    *
+   * @param[in] image Image used by this sampler
    * @param[in] uniformName String with the name of the uniform
    */
-  static Sampler New( const std::string& uniformName );
+  static Sampler New( Image& image, const std::string& uniformName );
 
   /**
    * @brief Default constructor, creates an empty handle
@@ -123,7 +124,7 @@ public:
    *
    * @param[in] image Image used by this sampler
    */
-  void SetImage( Image image );
+  void SetImage( Image& image );
 
   /**
    * @brief Set the filter modes for this sampler
@@ -132,7 +133,7 @@ public:
    * and MAGNIFICATION_FILTER
    *
    * @param[in] minFilter The minification filter that will be used
-   * @param[in] minFilter The magnification filter that will be used
+   * @param[in] magFilter The magnification filter that will be used
    */
   void SetFilterMode( FilterMode minFilter, FilterMode magFilter );
 
@@ -161,7 +162,7 @@ public:
    *
    * @param [in] pointer A pointer to a newly allocated Sampler
    */
-  explicit DALI_INTERNAL Sampler(Internal::Sampler* pointer);
+  explicit DALI_INTERNAL Sampler( Internal::Sampler* pointer );
 };
 
 } //namespace Dali