std::string line;
std::getline(ss, line);
- while (std::getline(ss, line))
+ while (std::getline(ss, line))
{
std::istringstream isline(line, std::istringstream::in);
std::string tag;
if (iniObj)
{
- pntAcum += (int)mPoints.Size();
- texAcum += (int)mTextures.Size();
- nrmAcum += (int)mNormals.Size();
-
CenterAndScale(true, mPoints);
-
- face = 0;
-
mSceneLoaded = true;
-
return true;
}
Property::Map vertexFormat;
vertexFormat["aPosition"] = Property::VECTOR3;
vertexFormat["aNormal"] = Property::VECTOR3;
- 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 textureFormat;
textureFormat["aTexCoord"] = Property::VECTOR2;
- PropertyBuffer extraVertices = PropertyBuffer::New( textureFormat, textures.Size() );
- extraVertices.SetData( &textures[0] );
+ PropertyBuffer extraVertices = PropertyBuffer::New( textureFormat );
+ extraVertices.SetData( &textures[0], textures.Size() );
surface.AddVertexBuffer( extraVertices );
}
Property::Map vertexExtFormat;
vertexExtFormat["aTangent"] = Property::VECTOR3;
vertexExtFormat["aBiNormal"] = Property::VECTOR3;
- PropertyBuffer extraVertices = PropertyBuffer::New( vertexExtFormat, verticesExt.Size() );
- extraVertices.SetData( &verticesExt[0] );
+ PropertyBuffer extraVertices = PropertyBuffer::New( vertexExtFormat );
+ extraVertices.SetData( &verticesExt[0], verticesExt.Size() );
surface.AddVertexBuffer( extraVertices );
}
//Indices
Property::Map indicesVertexFormat;
indicesVertexFormat["aIndices"] = Property::INTEGER;
- PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat, indices.Size() );
- indicesToVertices.SetData(&indices[0]);
+ PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
+ indicesToVertices.SetData( &indices[0], indices.Size() );
surface.SetIndexBuffer ( indicesToVertices );
}
surface.SetRequiresDepthTesting(true);
- //surface.SetProperty(Geometry::Property::GEOMETRY_HALF_EXTENTS, GetSize() * 0.5);
vertices.Clear();
verticesExt.Clear();