+ shader = Shader::New( VERTEX_SHADER_COLOR, FRAGMENT_SHADER_COLOR );
+ material = Material::New( shader );
+ }
+
+ //Create the index buffer
+ Property::Map indexFormat;
+ indexFormat["indices"] = Property::UNSIGNED_INTEGER;
+ PropertyBuffer indexBuffer = PropertyBuffer::New( indexFormat, 6u );
+ indexBuffer.SetData(gQuadIndex);
+
+ //Create the geometry
+ Geometry mesh = Geometry::New();
+ mesh.AddVertexBuffer( vertexBuffer );
+ mesh.SetIndexBuffer( indexBuffer );
+
+ //Add uniforms to the shader
+ shader.RegisterProperty( "uBackgroundColor", color );
+
+ //Create the renderer
+ Renderer renderer = Renderer::New( mesh, material );
+ renderer.SetDepthIndex( BACKGROUND_DEPTH_INDEX );
+
+ //Create the actor
+ Actor meshActor = Actor::New();
+ meshActor.SetSize( Vector3::ONE );
+ meshActor.AddRenderer( renderer );
+ meshActor.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+ meshActor.SetColorMode( USE_PARENT_COLOR );
+
+ //Constraint scale of the mesh actor to the size of the control
+ Constraint constraint = Constraint::New<Vector3>( meshActor,
+ Actor::Property::SCALE,