+void RenderManager::AddSampler( Render::Sampler* sampler )
+{
+ mImpl->samplerContainer.PushBack( sampler );
+}
+
+void RenderManager::RemoveSampler( Render::Sampler* sampler )
+{
+ DALI_ASSERT_DEBUG( NULL != sampler );
+
+ SamplerOwnerContainer& samplers = mImpl->samplerContainer;
+
+ // Find the sampler
+ for ( SamplerOwnerIter iter = samplers.Begin(); iter != samplers.End(); ++iter )
+ {
+ if ( *iter == sampler )
+ {
+ samplers.Erase( iter ); // Sampler found; now destroy it
+ break;
+ }
+ }
+}
+
+void RenderManager::AddTexture( Render::NewTexture* texture )
+{
+ mImpl->textureContainer.PushBack( texture );
+ texture->Initialize(mImpl->context);
+}
+
+void RenderManager::RemoveTexture( Render::NewTexture* texture )
+{
+ DALI_ASSERT_DEBUG( NULL != texture );
+
+ TextureOwnerContainer& textures = mImpl->textureContainer;
+
+ // Find the texture
+ for ( TextureOwnerIter iter = textures.Begin(); iter != textures.End(); ++iter )
+ {
+ if ( *iter == texture )
+ {
+ texture->Destroy( mImpl->context );
+ textures.Erase( iter ); // Texture found; now destroy it
+ break;
+ }
+ }
+}
+
+void RenderManager::UploadTexture( Render::NewTexture* texture, PixelDataPtr pixelData, const NewTexture::UploadParams& params )
+{
+ texture->Upload( mImpl->context, pixelData, params );
+}
+
+void RenderManager::GenerateMipmaps( Render::NewTexture* texture )
+{
+ texture->GenerateMipmaps( mImpl->context );
+}
+
+void RenderManager::SetFilterMode( Render::Sampler* sampler, unsigned int minFilterMode, unsigned int magFilterMode )
+{
+ sampler->mMinificationFilter = static_cast<Dali::FilterMode::Type>(minFilterMode);
+ sampler->mMagnificationFilter = static_cast<Dali::FilterMode::Type>(magFilterMode );
+}
+
+void RenderManager::SetWrapMode( Render::Sampler* sampler, unsigned int rWrapMode, unsigned int sWrapMode, unsigned int tWrapMode )
+{
+ sampler->mRWrapMode = static_cast<Dali::WrapMode::Type>(rWrapMode);
+ sampler->mSWrapMode = static_cast<Dali::WrapMode::Type>(sWrapMode);
+ sampler->mTWrapMode = static_cast<Dali::WrapMode::Type>(tWrapMode);
+}
+
+void RenderManager::AddFrameBuffer( Render::FrameBuffer* frameBuffer )
+{
+ mImpl->frameBufferContainer.PushBack( frameBuffer );
+ frameBuffer->Initialize(mImpl->context);
+}
+
+void RenderManager::RemoveFrameBuffer( Render::FrameBuffer* frameBuffer )
+{
+ DALI_ASSERT_DEBUG( NULL != frameBuffer );
+
+ FrameBufferOwnerContainer& framebuffers = mImpl->frameBufferContainer;
+
+ // Find the sampler
+ for ( FrameBufferOwnerIter iter = framebuffers.Begin(); iter != framebuffers.End(); ++iter )
+ {
+ if ( *iter == frameBuffer )
+ {
+ frameBuffer->Destroy( mImpl->context );
+ framebuffers.Erase( iter ); // frameBuffer found; now destroy it
+ break;
+ }
+ }
+}
+
+void RenderManager::AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::NewTexture* texture, unsigned int mipmapLevel, unsigned int layer )
+{
+ frameBuffer->AttachColorTexture( mImpl->context, texture, mipmapLevel, layer );
+}
+
+void RenderManager::AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+{
+ mImpl->propertyBufferContainer.PushBack( propertyBuffer );
+}
+
+void RenderManager::RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+{
+ DALI_ASSERT_DEBUG( NULL != propertyBuffer );
+
+ PropertyBufferOwnerContainer& propertyBuffers = mImpl->propertyBufferContainer;
+
+ // Find the sampler
+ for ( PropertyBufferOwnerIter iter = propertyBuffers.Begin(); iter != propertyBuffers.End(); ++iter )
+ {
+ if ( *iter == propertyBuffer )
+ {
+ propertyBuffers.Erase( iter ); // Property buffer found; now destroy it
+ break;
+ }
+ }
+}
+
+void RenderManager::SetPropertyBufferFormat(Render::PropertyBuffer* propertyBuffer, Render::PropertyBuffer::Format* format )
+{
+ propertyBuffer->SetFormat( format );
+}
+
+void RenderManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data, size_t size )
+{
+ propertyBuffer->SetData( data, size );
+}
+
+void RenderManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<unsigned short>& indices )
+{
+ geometry->SetIndexBuffer( indices );
+}
+
+void RenderManager::AddGeometry( Render::Geometry* geometry )
+{
+ mImpl->geometryContainer.PushBack( geometry );
+}
+
+void RenderManager::RemoveGeometry( Render::Geometry* geometry )
+{
+ DALI_ASSERT_DEBUG( NULL != geometry );
+
+ GeometryOwnerContainer& geometries = mImpl->geometryContainer;
+
+ // Find the geometry
+ for ( GeometryOwnerIter iter = geometries.Begin(); iter != geometries.End(); ++iter )
+ {
+ if ( *iter == geometry )
+ {
+ geometries.Erase( iter ); // Geometry found; now destroy it
+ break;
+ }
+ }
+}
+
+void RenderManager::AddVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+{
+ DALI_ASSERT_DEBUG( NULL != geometry );
+
+ GeometryOwnerContainer& geometries = mImpl->geometryContainer;
+
+ // Find the renderer
+ for ( GeometryOwnerIter iter = geometries.Begin(); iter != geometries.End(); ++iter )
+ {
+ if ( *iter == geometry )
+ {
+ (*iter)->AddPropertyBuffer( propertyBuffer );
+ break;
+ }
+ }
+}
+
+void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+{
+ DALI_ASSERT_DEBUG( NULL != geometry );
+
+ GeometryOwnerContainer& geometries = mImpl->geometryContainer;
+
+ // Find the renderer
+ for ( GeometryOwnerIter iter = geometries.Begin(); iter != geometries.End(); ++iter )
+ {
+ if ( *iter == geometry )
+ {
+ (*iter)->RemovePropertyBuffer( propertyBuffer );
+ break;
+ }
+ }
+}
+
+void RenderManager::SetGeometryType( Render::Geometry* geometry, unsigned int geometryType )
+{
+ geometry->SetGeometryType( Render::Geometry::GeometryType(geometryType) );
+}
+
+void RenderManager::AddRenderTracker( Render::RenderTracker* renderTracker )