- //Vertices
- Property::Map positionVertexFormat;
- positionVertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
- positionVertices.SetData( vertices, numberOfVertices );
-
- //Textures
- Property::Map textureVertexFormat;
- textureVertexFormat["aTexture"] = Property::VECTOR2;
- PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
- textureVertices.SetData( textures, numberOfVertices );
-
- //Indices
- unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
-
- // Create the geometry object
- Geometry texturedQuadGeometry = Geometry::New();
- texturedQuadGeometry.AddVertexBuffer( positionVertices );
- texturedQuadGeometry.AddVertexBuffer( textureVertices );
-
- texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
-
- return texturedQuadGeometry;
-}
-
-Geometry MetaballExplosionController::CreateGeometryComposition()
-{
- float aspect = (float)mScreenSize.y / (float)mScreenSize.x;
-
- // Create vertices and specify their color
- float xsize = mScreenSize.x * 0.5;
-
- //We create the meshdata for the metaballs
- struct VertexPosition { Vector2 position; };
- struct VertexTexture { Vector2 texture; };
- struct VertexNormal { Vector3 normal; };
-
- VertexPosition vertices[] = {
- { Vector2( -xsize, -xsize * aspect) },
- { Vector2( xsize, -xsize * aspect) },
- { Vector2( -xsize, xsize * aspect) },
- { Vector2( xsize, xsize * aspect) }
+ VertexPosition vertices[] =
+ {
+ { Vector2( -xsize, -xsize * aspect ) },
+ { Vector2( xsize, -xsize * aspect ) },
+ { Vector2( -xsize, xsize * aspect ) },
+ { Vector2( xsize, xsize * aspect ) }