- { Vector2( 0.0f, 0.0f) },
- { Vector2( 1.0f, 0.0f) },
- { Vector2( 0.0f, 1.0f) },
- { Vector2( 1.0f, 1.0f) },
- };
-
- const unsigned short indices[6] =
- {
- 3,1,0,0,2,3
- };
-
- Property::Map quadVertexFormat;
- quadVertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer quadVertices = PropertyBuffer::New( quadVertexFormat );
- quadVertices.SetData(quadVertexData, 4 );
-
- geometry = Geometry::New();
- geometry.AddVertexBuffer( quadVertices );
- geometry.SetIndexBuffer( indices, sizeof(indices)/sizeof(indices[0]) );
-}
-
-
-/**
- * @brief Create a renderer
- *
- * @param[in] frameBufferImage texture to be used
- * @param[out] renderer mesh renderer using the supplied texture
- */
-void CreateRenderer( FrameBufferImage frameBufferImage, Dali::Renderer& renderer )
-{
- Shader shader = Shader::New( VERTEX_SHADER_SCROLL , FRAGMENT_SHADER, Shader::Hint::NONE );
-
- Sampler sampler = Sampler::New();
- sampler.SetFilterMode(FilterMode::LINEAR, FilterMode::LINEAR );
-
- TextureSet textureSet = TextureSet::New();
- TextureSetImage( textureSet, 0u, frameBufferImage );
- textureSet.SetSampler( 0u, sampler );
-
- Geometry meshGeometry;
- CreateGeometry( meshGeometry );
-
- renderer = Renderer::New( meshGeometry, shader );
- renderer.SetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, true );
- renderer.SetTextures( textureSet );
-}