vertexFormat["aTexCoord"] = Property::VECTOR2;
//Create a vertex buffer for vertex positions and texture coordinates
- vertexBuffer = PropertyBuffer::New( vertexFormat, 4u );
- vertexBuffer.SetData( gQuadWithTexture );
+ vertexBuffer = PropertyBuffer::New( vertexFormat );
+ vertexBuffer.SetData( gQuadWithTexture, 4u );
//Create the geometry
mesh = Geometry::New();
Property::Map pentagonVertexFormat;
pentagonVertexFormat["aPosition1"] = Property::VECTOR2;
- PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat, 5 );
- pentagonVertices.SetData(pentagonVertexData);
+ PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat );
+ pentagonVertices.SetData(pentagonVertexData, 5);
Property::Map pentacleVertexFormat;
pentacleVertexFormat["aPosition2"] = Property::VECTOR2;
- PropertyBuffer pentacleVertices = PropertyBuffer::New( pentacleVertexFormat, 5 );
- pentacleVertices.SetData(pentacleVertexData);
+ PropertyBuffer pentacleVertices = PropertyBuffer::New( pentacleVertexFormat );
+ pentacleVertices.SetData( pentacleVertexData, 5 );
// Create indices
unsigned int indexData[10] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 0 };
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) );
- indices.SetData(indexData);
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, sizeof(indexData)/sizeof(indexData[0]) );
// Create the geometry object
Geometry pentagonGeometry = Geometry::New();
Property::Map initialPositionVertexFormat;
initialPositionVertexFormat["aInitPos"] = Property::VECTOR2;
- PropertyBuffer initialPositionVertices = PropertyBuffer::New( initialPositionVertexFormat, numberOfVertices );
- initialPositionVertices.SetData(quad);
+ PropertyBuffer initialPositionVertices = PropertyBuffer::New( initialPositionVertexFormat );
+ initialPositionVertices.SetData( quad, numberOfVertices );
Property::Map finalPositionVertexFormat;
finalPositionVertexFormat["aFinalPos"] = Property::VECTOR2;
- PropertyBuffer finalPositionVertices = PropertyBuffer::New( finalPositionVertexFormat, numberOfVertices );
- finalPositionVertices.SetData(cat);
+ PropertyBuffer finalPositionVertices = PropertyBuffer::New( finalPositionVertexFormat );
+ finalPositionVertices.SetData( cat, numberOfVertices );
Property::Map colorVertexFormat;
colorVertexFormat["aColor"] = Property::VECTOR3;
- PropertyBuffer colorVertices = PropertyBuffer::New( colorVertexFormat, numberOfVertices );
- colorVertices.SetData(colors);
+ PropertyBuffer colorVertices = PropertyBuffer::New( colorVertexFormat );
+ colorVertices.SetData( colors, numberOfVertices );
// Create the geometry object
Geometry texturedQuadGeometry = Geometry::New();
Property::Map texturedQuadVertexFormat;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
- PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
- texturedQuadVertices.SetData(texturedQuadVertexData);
+ PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat );
+ texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
// Create indices
unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, 6 );
- indices.SetData(indexData);
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, 6 );
// Create the geometry object
Geometry texturedQuadGeometry = Geometry::New();
//Vertices
Property::Map positionVertexFormat;
positionVertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat, numberOfVertices );
- positionVertices.SetData(vertices);
+ PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
+ positionVertices.SetData( vertices, numberOfVertices );
//Textures
Property::Map textureVertexFormat;
textureVertexFormat["aTexture"] = Property::VECTOR2;
- PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat, numberOfVertices );
- textureVertices.SetData(textures);
+ PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
+ textureVertices.SetData( textures, numberOfVertices );
//Indices
Property::Map indicesVertexFormat;
indicesVertexFormat["aIndices"] = Property::INTEGER;
- PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat, 6 );
- indicesToVertices.SetData(indices);
+ PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
+ indicesToVertices.SetData( indices, 6 );
// Create the geometry object
Geometry texturedQuadGeometry = Geometry::New();
//Vertices
Property::Map positionVertexFormat;
positionVertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat, numberOfVertices );
- positionVertices.SetData(vertices);
+ PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
+ positionVertices.SetData( vertices, numberOfVertices );
//Textures
Property::Map textureVertexFormat;
textureVertexFormat["aTexture"] = Property::VECTOR2;
- PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat, numberOfVertices );
- textureVertices.SetData(textures);
+ PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
+ textureVertices.SetData( textures, numberOfVertices );
//Indices
Property::Map indicesVertexFormat;
indicesVertexFormat["aIndices"] = Property::INTEGER;
- PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat, 6 );
- indicesToVertices.SetData(indices);
+ PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
+ indicesToVertices.SetData( indices, 6 );
// Create the geometry object
Geometry texturedQuadGeometry = Geometry::New();
//Vertices
Property::Map positionVertexFormat;
positionVertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat, numberOfVertices );
- positionVertices.SetData(vertices);
+ PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
+ positionVertices.SetData( vertices, numberOfVertices );
//Textures
Property::Map textureVertexFormat;
textureVertexFormat["aTexture"] = Property::VECTOR2;
- PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat, numberOfVertices );
- textureVertices.SetData(textures);
+ PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
+ textureVertices.SetData( textures, numberOfVertices );
//Normals
Property::Map normalVertexFormat;
normalVertexFormat["aNormal"] = Property::VECTOR3;
- PropertyBuffer normalVertices = PropertyBuffer::New( normalVertexFormat, numberOfVertices );
- normalVertices.SetData(normals);
+ PropertyBuffer normalVertices = PropertyBuffer::New( normalVertexFormat );
+ normalVertices.SetData( normals, numberOfVertices );
//Indices
Property::Map indicesVertexFormat;
indicesVertexFormat["aIndices"] = Property::INTEGER;
- PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat, 6 );
- indicesToVertices.SetData(indices);
+ PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
+ indicesToVertices.SetData( indices, 6 );
// Create the geometry object
//Vertices
Property::Map positionVertexFormat;
positionVertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat, numberOfVertices );
- positionVertices.SetData(vertices);
+ PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
+ positionVertices.SetData( vertices, numberOfVertices );
//Textures
Property::Map textureVertexFormat;
textureVertexFormat["aTexture"] = Property::VECTOR2;
- PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat, numberOfVertices );
- textureVertices.SetData(textures);
+ PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
+ textureVertices.SetData( textures, numberOfVertices );
//Normals
Property::Map normalVertexFormat;
normalVertexFormat["aNormal"] = Property::VECTOR3;
- PropertyBuffer normalVertices = PropertyBuffer::New( normalVertexFormat, numberOfVertices );
- normalVertices.SetData(normals);
+ PropertyBuffer normalVertices = PropertyBuffer::New( normalVertexFormat );
+ normalVertices.SetData( normals, numberOfVertices );
//Indices
Property::Map indicesVertexFormat;
indicesVertexFormat["aIndices"] = Property::INTEGER;
- PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat, 6 );
- indicesToVertices.SetData(indices);
-
+ PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
+ indicesToVertices.SetData( indices, 6 );
// Create the geometry object
Geometry texturedQuadGeometry = Geometry::New();
vertexFormat["aPosition"] = Property::VECTOR3;
vertexFormat["aTexCoord"] = Property::VECTOR2;
vertexFormat["aColor"] = Property::VECTOR3;
- PropertyBuffer vertices = PropertyBuffer::New( vertexFormat, 5 );
- vertices.SetData( vertexData );
+ PropertyBuffer vertices = PropertyBuffer::New( vertexFormat );
+ vertices.SetData( vertexData, 5 );
// Specify all the faces
unsigned int indexData[12] = { 0,1,3,0,2,4,0,3,4,0,2,1 };
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, 12 );
- indices.SetData( indexData );
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, 12 );
// Create the geometry object
Geometry geometry = Geometry::New();
Property::Map polyhedraVertexFormat;
polyhedraVertexFormat["aPosition"] = Property::VECTOR2;
polyhedraVertexFormat["aHue"] = Property::FLOAT;
- PropertyBuffer polyhedraVertices = PropertyBuffer::New( polyhedraVertexFormat, numSides );
- polyhedraVertices.SetData(polyhedraVertexData);
+ PropertyBuffer polyhedraVertices = PropertyBuffer::New( polyhedraVertexFormat );
+ polyhedraVertices.SetData( polyhedraVertexData, numSides );
// Create the geometry object
Geometry polyhedraGeometry = Geometry::New();
vertexFormat["aAngleIndex"] = Property::FLOAT;
vertexFormat["aPosition1"] = Property::VECTOR2;
vertexFormat["aPosition2"] = Property::VECTOR2;
- PropertyBuffer vertices = PropertyBuffer::New( vertexFormat, 7u );
- vertices.SetData( vertexData );
+ PropertyBuffer vertices = PropertyBuffer::New( vertexFormat );
+ vertices.SetData( vertexData, 7u );
unsigned int indexData[15] = { 0,1,2,0,2,3,0,3,4,0,4,5,0,5,6 };
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, 15u );
- indices.SetData( indexData );
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, 15u );
Geometry meshGeometry = Geometry::New();
meshGeometry.AddVertexBuffer( vertices );
vertexFormat["aPosition"] = Property::VECTOR3;
vertexFormat["aNormal"] = Property::VECTOR3;
vertexFormat["aTexCoord"] = Property::VECTOR2;
- PropertyBuffer surfaceVertices = PropertyBuffer::New( vertexFormat, vertices.size() );
- surfaceVertices.SetData( &vertices[0] );
+ PropertyBuffer surfaceVertices = PropertyBuffer::New( vertexFormat );
+ surfaceVertices.SetData( &vertices[0], vertices.size() );
Geometry surface = Geometry::New();
surface.AddVertexBuffer( surfaceVertices );
Property::Map texturedQuadVertexFormat;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
- PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
- texturedQuadVertices.SetData(texturedQuadVertexData);
+ PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat );
+ texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
// Create indices
unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) );
- indices.SetData(indexData);
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, sizeof(indexData)/sizeof(indexData[0]) );
// Create the geometry object
Geometry texturedQuadGeometry = Geometry::New();