$(internal_src_dir)/update/animation/scene-graph-constraint-base.cpp \
$(internal_src_dir)/update/common/discard-queue.cpp \
$(internal_src_dir)/update/common/property-base.cpp \
+ $(internal_src_dir)/update/common/property-buffer.cpp \
$(internal_src_dir)/update/common/property-condition-functions.cpp \
$(internal_src_dir)/update/common/property-condition-step-functions.cpp \
$(internal_src_dir)/update/common/property-condition-variable-step-functions.cpp \
$(internal_src_dir)/update/common/scene-graph-property-notification.cpp \
$(internal_src_dir)/update/controllers/render-message-dispatcher.cpp \
$(internal_src_dir)/update/controllers/scene-controller-impl.cpp \
+ $(internal_src_dir)/update/effects/scene-graph-material.cpp \
+ $(internal_src_dir)/update/effects/scene-graph-sampler.cpp \
+ $(internal_src_dir)/update/geometry/scene-graph-geometry.cpp \
$(internal_src_dir)/update/gestures/pan-gesture-profiling.cpp \
$(internal_src_dir)/update/gestures/scene-graph-pan-gesture.cpp \
$(internal_src_dir)/update/queue/update-message-queue.cpp \
$(internal_src_dir)/update/node-attachments/scene-graph-image-attachment.cpp \
$(internal_src_dir)/update/node-attachments/scene-graph-renderable-attachment.cpp \
$(internal_src_dir)/update/node-attachments/scene-graph-text-attachment.cpp \
+ $(internal_src_dir)/update/node-attachments/scene-graph-renderer-attachment.cpp \
$(internal_src_dir)/update/nodes/node.cpp \
$(internal_src_dir)/update/nodes/node-messages.cpp \
$(internal_src_dir)/update/nodes/scene-graph-layer.cpp \
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_ATTRIBUTE_DATA_PROVIDER_H
+#define DALI_INTERNAL_SCENE_GRAPH_ATTRIBUTE_DATA_PROVIDER_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.
+ */
+
+#include <dali/public-api/shader-effects/attribute.h>
+#include <dali/integration-api/resource-declarations.h>
+#include <dali/internal/common/buffer-index.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+class AttributeDataProvider
+{
+public:
+ /**
+ * Constructor
+ */
+ AttributeDataProvider()
+ {
+ }
+
+ virtual const AttributeList& GetAttributeList() = 0;
+
+protected:
+ /**
+ * No deletion through this interface
+ */
+ virtual ~AttributeDataProvider()
+ {
+ }
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_ATTRIBUTE_DATA_PROVIDER_H
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H
+#define DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_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.
+ */
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+class SamplerDataProvider;
+
+
+class MaterialDataProvider
+{
+public:
+ typedef Dali::Vector< SamplerDataProvider* > Samplers;
+
+ /**
+ * Construtor
+ */
+ MaterialDataProvider()
+ {
+ }
+
+ /**
+ * Returns the list of samplers that this material provides
+ * @return The list of samplers
+ */
+ const Samplers& GetSamplers();
+
+protected:
+ /**
+ * Destructor. No deletion through this interface
+ */
+ virtual ~MaterialDataProvider()
+ {
+ }
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H
* Virtual destructor, this is an interface, no deletion through this interface
*/
virtual ~RenderDataProvider() { }
-
-
};
} // SceneGraph
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_RENDER_GEOMETRY_H
+#define DALI_INTERNAL_SCENE_GRAPH_RENDER_GEOMETRY_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.
+ */
+
+#include <dali/internal/common/buffer-index.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+/**
+ * This class encapsulates the GPU buffers. It is used to upload vertex data
+ * to it's GPU buffers, to bind all the buffers and to setup/teardown vertex attribute
+ * bindings
+ */
+class RenderGeometry
+{
+public:
+ typedef OwnerContainer< GPUBuffer* > GPUBuffers;
+
+ /**
+ * Constructor
+ */
+ RenderGeometry();
+
+ /**
+ * Destructor
+ */
+
+ void UploadVertexData();
+
+ void BindBuffers();
+
+ void EnableVertexAttributes( Program& progam );
+
+ void DisableVertexAttributes( Program& program );
+
+private:
+ GPUBuffers mGpuBuffers;
+ AttributeDataProvider& mAttributeDataProvider;
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_SAMPLER_DATA_PROVIDER_H
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_SAMPLER_DATA_PROVIDER_H
+#define DALI_INTERNAL_SCENE_GRAPH_SAMPLER_DATA_PROVIDER_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.
+ */
+
+#include <dali/public-api/shader-effects/sampler.h>
+#include <dali/integration-api/resource-declarations.h>
+#include <dali/internal/common/buffer-index.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+class SamplerDataProvider
+{
+public:
+ typedef Dali::Sampler::FilterMode FilterMode;
+ typedef Dali::Sampler::WrapMode WrapMode;
+ typedef Dali::Integration::ResourceId ResourceId;
+
+ /**
+ * Constructor
+ */
+ SamplerDataProvider()
+ {
+ }
+
+ /**
+ * Get the texture identity associated with the sampler
+ * @return The texture identity
+ */
+ virtual ResourceId GetTextureId() = 0;
+
+ /**
+ * Get the filter mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The minify filter mode
+ */
+ virtual FilterMode GetMinifyFilterMode( BufferIndex bufferIndex ) = 0;
+
+ /**
+ * Get the filter mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The magnify filter mode
+ */
+ virtual FilterMode GetMagifyFilterMode( BufferIndex bufferIndex ) = 0;
+
+ /**
+ * Get the horizontal wrap mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The horizontal wrap mode
+ */
+ virtual WrapMode GetUWrapMode( BufferIndex bufferIndex ) = 0;
+
+ /**
+ * Get the vertical wrap mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The vertical wrap mode
+ */
+ virtual WrapMode GetVWrapMode( BufferIndex bufferIndex ) = 0;
+
+protected:
+ /**
+ * No deletion through this interface
+ */
+ virtual ~SamplerDataProvider()
+ {
+ }
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_SAMPLER_DATA_PROVIDER_H
--- /dev/null
+/*
+ * 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.
+ */
+
+#include "property-buffer.h"
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+PropertyBuffer::PropertyBuffer()
+{
+}
+
+PropertyBuffer::~PropertyBuffer()
+{
+}
+
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_H
+#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_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.
+ */
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+class PropertyBuffer
+{
+public:
+ /**
+ * Constructor
+ */
+ PropertyBuffer();
+
+ /**
+ * Destructor
+ */
+ ~PropertyBuffer();
+
+private:
+ // Data
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_H
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_UNIFORM_MAP_H
+#define DALI_INTERNAL_SCENE_GRAPH_UNIFORM_MAP_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.
+ */
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+/**
+ * The uniform map is generated on stage change, e.g when renderers, materials, geometry,
+ * actors etc are added/removed from the stage.
+ *
+ * It computes a list of uniform strings to property value addresses that is needed
+ * for the Renderer to match once against Program uniforms; subsequent render calls do
+ * not need to re-generate the match, instead using the uniform index.
+ */
+class UniformMap
+{
+public:
+ /**
+ * Constructor
+ */
+ UniformMap;
+
+private:
+ // data
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_UNIFORM_MAP_H
--- /dev/null
+/*
+ * 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 "scene-graph-material.h"
+
+// INTERNAL HEADERS
+#include <dali/internal/render/renderers/sampler-data-provider.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+Material::Material()
+: mShader(NULL),
+ mCullFaceMode( CullNone ),
+ mBlendingOptions()
+{
+}
+
+Material::~Material()
+{
+}
+
+void Material::SetShader( Shader* shader )
+{
+}
+
+Shader* Material::GetShader()
+{
+ return mShader;
+}
+
+void Material::AddSampler( Sampler* sampler )
+{
+ // @todo MESH_REWORK
+}
+
+void Material::RemoveSampler( Sampler* sampler )
+{
+ // @todo MESH_REWORK
+}
+
+const Material::Samplers& Material::GetSamplers() const
+{
+ // @todo MESH_REWORK
+ return mSamplers;
+}
+
+void Material::SetFaceCulling( BufferIndex updateBufferIndex, Dali::CullFaceMode mode )
+{
+ // @todo MESH_REWORK
+}
+
+CullFaceMode Material::GetFaceCulling() const
+{
+ // @todo MESH_REWORK
+ return mCullFaceMode;
+}
+
+void Material::SetBlendingOptions( BufferIndex updateBufferIndex, unsigned int options )
+{
+ // @todo MESH_REWORK
+}
+
+void Material::SetBlendColor( BufferIndex updateBufferIndex, const Vector4& color )
+{
+ // @todo MESH_REWORK
+}
+
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_MATERIAL_H
+#define DALI_INTERNAL_SCENE_GRAPH_MATERIAL_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.
+ */
+
+#include <dali/public-api/actors/renderable-actor.h> // For CullFaceMode
+#include <dali/internal/common/buffer-index.h>
+#include <dali/internal/common/blending-options.h>
+#include <dali/internal/update/common/double-buffered.h>
+#include <dali/internal/update/common/property-owner.h>
+#include <dali/internal/render/renderers/material-data-provider.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+class Sampler;
+class Shader;
+
+class Material : public PropertyOwner, public MaterialDataProvider
+{
+public:
+ typedef Dali::Vector< Sampler* > Samplers;
+
+ /**
+ * Constructor
+ */
+ Material();
+
+ /**
+ * Destructor
+ */
+ virtual ~Material();
+
+ /**
+ * Set the shader effect for this material
+ * @param[in] shader The shader effect to use
+ */
+ void SetShader( Shader* shader );
+
+ /**
+ * Get the shader effect of this material
+ * @return the shader effect;
+ */
+ Shader* GetShader();
+
+ /**
+ * Add a sampler (image + sampler modes) to the material
+ * @param[in] sampler A sampler to add
+ */
+ void AddSampler( Sampler* sampler );
+
+ /**
+ * Remove a sampler (image + sampler modes) from the material
+ * @param[in] sampler A sampler to remove
+ */
+ void RemoveSampler( Sampler* sampler );
+
+ /**
+ * Get the samplers this material uses.
+ * @return the samplers
+ */
+ const Samplers& GetSamplers() const;
+
+ /**
+ * Set the face culling mode for geometry used by this material
+ * @param[in] mode The face culling mode to use
+ */
+ void SetFaceCulling( BufferIndex updateBufferIndex, Dali::CullFaceMode mode );
+
+ /**
+ * Get the face culling mode
+ * @return the face culling mdoe
+ */
+ CullFaceMode GetFaceCulling() const ;
+
+ // @note Blending mode is per actor, not per material (requires actor color)
+
+ /**
+ * Set the blending options. This should only be called from the update-thread.
+ * @param[in] updateBufferIndex The current update buffer index.
+ * @param[in] options A bitmask of blending options.
+ */
+ void SetBlendingOptions( BufferIndex updateBufferIndex, unsigned int options );
+
+ /**
+ * Set the blend-color. This should only be called from the update-thread.
+ * @param[in] updateBufferIndex The current update buffer index.
+ * @param[in] color The new blend-color.
+ */
+ void SetBlendColor( BufferIndex updateBufferIndex, const Vector4& color );
+
+private:
+ Shader* mShader;
+ Samplers mSamplers; // Not owned (though who does?)
+ Dali::CullFaceMode mCullFaceMode:3;
+ BlendingOptions mBlendingOptions;
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_MATERIAL_H
--- /dev/null
+/*
+ * 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 "scene-graph-sampler.h"
+
+// EXTERNAL HEADERS
+
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+Sampler::Sampler( const std::string& samplerName )
+: mUniformName( samplerName ),
+ mTextureId( 0 ),
+ mMinFilter( Dali::Sampler::DEFAULT ),
+ mMagFilter( Dali::Sampler::DEFAULT ),
+ mUWrapMode( Dali::Sampler::CLAMP_TO_EDGE ),
+ mVWrapMode( Dali::Sampler::CLAMP_TO_EDGE )
+{
+}
+
+Sampler::~Sampler()
+{
+}
+
+void Sampler::SetUniformName( const std::string& samplerName )
+{
+}
+
+void Sampler::SetTextureId( ResourceId textureId )
+{
+}
+
+void Sampler::SetFilterMode( BufferIndex bufferIndex, FilterMode minFilter, FilterMode magFilter )
+{
+}
+
+void Sampler::SetWrapMode( BufferIndex bufferIndex, WrapMode uWrap, WrapMode vWrap )
+{
+}
+
+const std::string& Sampler::GetUniformName()
+{
+ // @todo MESH_REWORK
+ return mUniformName;
+}
+
+Integration::ResourceId Sampler::GetTextureId()
+{
+ // @todo MESH_REWORK
+ return mTextureId;
+}
+
+Sampler::FilterMode Sampler::GetMinifyFilterMode( BufferIndex bufferIndex )
+{
+ // @todo MESH_REWORK
+ return mMinFilter[bufferIndex];
+}
+
+Sampler::FilterMode Sampler::GetMagifyFilterMode( BufferIndex bufferIndex )
+{
+ // @todo MESH_REWORK
+ return mMagFilter[bufferIndex];
+}
+
+Sampler::WrapMode Sampler::GetUWrapMode( BufferIndex bufferIndex )
+{
+ // @todo MESH_REWORK
+ return mUWrapMode[bufferIndex];
+}
+
+Sampler::WrapMode Sampler::GetVWrapMode( BufferIndex bufferIndex )
+{
+ // @todo MESH_REWORK
+ return mVWrapMode[bufferIndex];
+}
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_SAMPLER_H
+#define DALI_INTERNAL_SCENE_GRAPH_SAMPLER_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.
+ */
+
+#include <dali/public-api/shader-effects/sampler.h>
+#include <dali/internal/update/common/double-buffered.h>
+#include <dali/internal/update/common/property-owner.h>
+#include <dali/internal/render/renderers/sampler-data-provider.h>
+
+#include <string>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+class Sampler : public PropertyOwner, public SamplerDataProvider
+{
+public:
+ typedef Dali::Sampler::FilterMode FilterMode;
+ typedef Dali::Sampler::WrapMode WrapMode;
+
+ /**
+ * Constructor
+ */
+ Sampler( const std::string& samplerName );
+
+ /**
+ * Destructor
+ */
+ virtual ~Sampler();
+
+ /**
+ * Set the uniform name of this sampler. This allows the shader to find the
+ * GL index of this sampler.
+ */
+ void SetUniformName( const std::string& samplerName );
+
+ /**
+ * Set the texture identity of this sampler
+ * @param[in] textureId The identity of the texture
+ */
+ void SetTextureId( ResourceId textureId );
+
+ /**
+ * Set the filter modes for minify and magnify filters
+ * @param[in] bufferIndex The buffer index to use
+ * @param[in] minFilter The minify filter
+ * @param[in] magFilter The magnify filter
+ */
+ void SetFilterMode( BufferIndex bufferIndex, FilterMode minFilter, FilterMode magFilter );
+
+ /**
+ * @param[in] bufferIndex The buffer index to use
+ */
+ void SetWrapMode( BufferIndex bufferIndex, WrapMode uWrap, WrapMode vWrap );
+
+public: // SamplerDataProvider interface
+ /**
+ *
+ */
+ const std::string& GetUniformName();
+
+ /**
+ * Get the texture ID
+ * @return the identity of the associated texture
+ */
+ virtual ResourceId GetTextureId();
+
+ /**
+ * Get the filter mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The minify filter mode
+ */
+ virtual FilterMode GetMinifyFilterMode( BufferIndex bufferIndex );
+
+ /**
+ * Get the filter mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The magnify filter mode
+ */
+ virtual FilterMode GetMagifyFilterMode( BufferIndex bufferIndex );
+
+ /**
+ * Get the horizontal wrap mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The horizontal wrap mode
+ */
+ virtual WrapMode GetUWrapMode( BufferIndex bufferIndex );
+
+ /**
+ * Get the vertical wrap mode
+ * @param[in] bufferIndex The buffer index to use
+ * @return The vertical wrap mode
+ */
+ virtual WrapMode GetVWrapMode( BufferIndex bufferIndex );
+
+private:
+ std::string mUniformName; ///< The name of the uniform referencing this sampler
+ ResourceId mTextureId; ///< The identity of the associated texture
+
+ DoubleBuffered<FilterMode> mMinFilter; ///< The minify filter
+ DoubleBuffered<FilterMode> mMagFilter; ///< The magnify filter
+ DoubleBuffered<WrapMode> mUWrapMode; ///< The horizontal wrap mode
+ DoubleBuffered<WrapMode> mVWrapMode; ///< The vertical wrap mode
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_SAMPLER_H
--- /dev/null
+/*
+ * 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.
+ */
+
+#include "scene-graph-geometry.h"
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+Geometry::Geometry()
+: mGeometryType(Dali::Geometry::TRIANGLES)
+{
+}
+
+Geometry::~Geometry()
+{
+}
+
+void Geometry::AddVertexBuffer( PropertyBuffer vertexBuffer )
+{
+}
+
+void Geometry::RemoveVertexBuffer( PropertyBuffer vertexBuffer )
+{
+}
+
+void Geometry::SetIndexBuffer( PropertyBuffer indexBuffer )
+{
+}
+
+void Geometry::SetGeometryType( Geometry::GeometryType geometryType )
+{
+}
+
+const Geometry::VertexBuffers& Geometry::GetVertexBuffers()
+{
+ return mVertexBuffers;
+}
+
+const PropertyBuffer& Geometry::GetIndexBuffer()
+{
+ return mIndexBuffer;
+}
+
+Geometry::GeometryType Geometry::GetGeometryType( )
+{
+ return mGeometryType;
+}
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_H
+#define DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_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.
+ */
+
+#include <dali/public-api/geometry/geometry.h>
+#include <dali/internal/update/common/double-buffered.h>
+#include <dali/internal/update/common/property-owner.h>
+#include <dali/internal/update/common/property-buffer.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+/**
+ * This scene graph object is a property owner. It describes a geometry using a
+ * number of PropertyBuffers acting as Vertex buffers.
+ */
+class Geometry : public PropertyOwner
+{
+public:
+ typedef Dali::Geometry::GeometryType GeometryType;
+
+ typedef OwnerContainer< PropertyBuffer* > VertexBuffers;
+
+ /**
+ * Constructor
+ */
+ Geometry();
+
+ /**
+ * Destructor
+ */
+ ~Geometry();
+
+ /**
+ * Add a property buffer to be used as a vertex buffer
+ */
+ void AddVertexBuffer( PropertyBuffer vertexBuffer );
+
+ /**
+ * Remove a property buffer to be used as a vertex buffer
+ * @param[in] vertexBuffer the associated vertex buffer to remove
+ */
+ void RemoveVertexBuffer( PropertyBuffer vertexBuffer );
+
+ /**
+ * Set the buffer to be used as a source of indices for the geometry
+ * @param[in] indexBuffer the Property buffer describing the indexes for Line, Triangle tyes.
+ */
+ void SetIndexBuffer( PropertyBuffer indexBuffer );
+
+ /**
+ * Set the type of geometry to draw (Points, Lines, Triangles, etc)
+ * @param[in] geometryType The geometry type
+ */
+ void SetGeometryType( GeometryType geometryType );
+
+public: // GeometryDataProvider
+ /**
+ * Get the vertex buffers of the geometry
+ * @return A const reference to the vertex buffers
+ */
+ virtual const VertexBuffers& GetVertexBuffers();
+
+ /**
+ * Get the index buffer of the geometry
+ * @return A const reference to the index buffer
+ */
+ virtual const PropertyBuffer& GetIndexBuffer();
+
+ /**
+ * Get the type of geometry to draw
+ */
+ virtual GeometryType GetGeometryType( );
+
+private:
+ VertexBuffers mVertexBuffers; ///< The vertex buffers
+ PropertyBuffer mIndexBuffer; ///< The index buffer if required
+ GeometryType mGeometryType; ///< The type of geometry (tris/lines etc)
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_H
--- /dev/null
+/*
+ * 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.
+ */
+
+#include "scene-graph-renderer-attachment.h"
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+
+RendererAttachment::RendererAttachment()
+: RenderableAttachment( false ),
+ mMaterial(NULL),
+ mGeometry(NULL),
+ mDepthIndex(0)
+{
+}
+
+RendererAttachment::~RendererAttachment()
+{
+ mMaterial=NULL;
+ mGeometry=NULL;
+}
+
+void RendererAttachment::SetMaterial(const Material& material)
+{
+ // @todo MESH_REWORK
+ mMaterial = &material;
+}
+
+const Material& RendererAttachment::GetMaterial() const
+{
+ return *mMaterial;
+}
+
+void RendererAttachment::SetGeometry(const Geometry& geometry)
+{
+ // @todo MESH_REWORK
+ mGeometry = &geometry;
+}
+
+const Geometry& RendererAttachment::GetGeometry() const
+{
+ return *mGeometry;
+}
+
+void RendererAttachment::SetDepthIndex( int index )
+{
+ // @todo MESH_REWORK
+ mDepthIndex = index;
+}
+
+int RendererAttachment::GetDepthIndex() const
+{
+ return mDepthIndex;
+}
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
--- /dev/null
+#ifndef DALI_INTERNAL_SCENE_GRAPH_RENDERER_ATTACHMENT_H
+#define DALI_INTERNAL_SCENE_GRAPH_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.
+ */
+
+#include <dali/internal/update/common/double-buffered.h>
+#include <dali/internal/update/common/property-owner.h>
+#include <dali/internal/update/node-attachments/scene-graph-renderable-attachment.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace SceneGraph
+{
+class Material;
+class Geometry;
+
+
+class RendererAttachment : public RenderableAttachment, public PropertyOwner
+{
+public:
+ /**
+ * Constructor
+ */
+ RendererAttachment();
+
+ /**
+ * Destructor
+ */
+ virtual ~RendererAttachment();
+
+ /**
+ * Set the material for the renderer
+ * @param[in] material The material this renderer will use
+ */
+ void SetMaterial(const Material& material);
+
+ /**
+ * Get the material of this renderer
+ * @return the material this renderer uses
+ */
+ const Material& GetMaterial() const;
+
+ /**
+ * Set the geometry for the renderer
+ * @param[in] geometry The geometry this renderer will use
+ */
+ void SetGeometry(const Geometry& geometry);
+
+ /**
+ * Get the geometry of this renderer
+ * @return the geometry this renderer uses
+ */
+ const Geometry& GetGeometry() const;
+
+ /**
+ * Set the depth index
+ * @param[in] index The depth index to use
+ */
+ void SetDepthIndex( int index );
+
+ /**
+ * Get the depth index
+ * @return The depth index to use
+ */
+ int GetDepthIndex() const ;
+
+private:
+ const Material* mMaterial; ///< The material this renderer uses. (Not owned)
+ const Geometry* mGeometry; ///< The geometry this renderer uses. (Not owned)
+ int mDepthIndex; ///< Used only in PrepareRenderInstructions
+};
+
+} // namespace SceneGraph
+} // namespace Internal
+} // namespace Dali
+
+
+#endif // DALI_INTERNAL_SCENE_GRAPH_RENDERER_ATTACHMENT_H
};
+
/**
* @brief A base class for renderable actors.
*/