Added vertex and index buffer mapping and reading to Primitive.