// Sort routine for VertexElement bool vertexElementLess(const VertexElement& e1, const VertexElement& e2) { // Sort by source first if (e1.getSource() < e2.getSource()) { return true; } else if (e1.getSource() == e2.getSource()) { // Use ordering of semantics to sort if (e1.getSemantic() < e2.getSemantic()) { return true; } else if (e1.getSemantic() == e2.getSemantic()) { // Use index to sort if (e1.getIndex() < e2.getIndex()) { return true; } } } return false; }
//------------------------------------------------------------------------------ void Mesh::addVertexElement(const VertexElement& vertexElement) { mVertexElements[vertexElement.getSemantic()] = vertexElement; mVertexSemFlags |= (1L << vertexElement.getSemantic()); }