Browse Source

Don't add null pointers for nonexistent mesh primitive data.

pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
304a8445a5
  1. 2
      src/Primitives/Cube.cpp
  2. 2
      src/Primitives/Icosphere.cpp

2
src/Primitives/Cube.cpp

@ -41,6 +41,6 @@ Cube::Cube(): MeshData(Mesh::Primitive::Triangles, new vector<unsigned int>{
Vector4( 1.0f, -1.0f, 1.0f), Vector4( 1.0f, -1.0f, 1.0f),
Vector4(-1.0f, 1.0f, 1.0f), Vector4(-1.0f, 1.0f, 1.0f),
Vector4( 1.0f, 1.0f, 1.0f) Vector4( 1.0f, 1.0f, 1.0f)
}}, {nullptr}, {nullptr}) {} }}, {}, {}) {}
}} }}

2
src/Primitives/Icosphere.cpp

@ -53,7 +53,7 @@ Icosphere<0>::Icosphere(): MeshData(Mesh::Primitive::Triangles, new vector<unsig
Vector3(0, -0.525731f, -0.850651f), Vector3(0, -0.525731f, -0.850651f),
Vector3(0, 0.525731f, -0.850651f), Vector3(0, 0.525731f, -0.850651f),
Vector3(0, 0.525731f, 0.850651f) Vector3(0, 0.525731f, 0.850651f)
}}, {nullptr}) { }}, {}) {
vertices(0)->assign(normals(0)->begin(), normals(0)->end()); vertices(0)->assign(normals(0)->begin(), normals(0)->end());
} }

Loading…
Cancel
Save