diff options
| author | Miles Macklin <[email protected]> | 2018-03-19 15:10:24 +1300 |
|---|---|---|
| committer | Miles Macklin <[email protected]> | 2018-03-19 15:10:24 +1300 |
| commit | 8ee05c79ae1748ef132a12e4fb0af284899faec6 (patch) | |
| tree | 82bd5aa1892e28ce7886b6cfeafe66a47ff38e67 /core/mesh.cpp | |
| parent | Flex 1.2 (beta 2) (diff) | |
| download | flex-8ee05c79ae1748ef132a12e4fb0af284899faec6.tar.xz flex-8ee05c79ae1748ef132a12e4fb0af284899faec6.zip | |
Flex 1.2.0 release
Diffstat (limited to 'core/mesh.cpp')
| -rw-r--r-- | core/mesh.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/mesh.cpp b/core/mesh.cpp index 371e664..43bd87a 100644 --- a/core/mesh.cpp +++ b/core/mesh.cpp @@ -814,7 +814,7 @@ Mesh* CreateDiscMesh(float radius, uint32_t segments) Mesh* m = new Mesh(); m->m_positions.resize(numVerts); - m->m_normals.resize(numVerts); + m->m_normals.resize(numVerts, Vec3(0.0f, 1.0f, 0.0f)); m->m_positions[0] = Point3(0.0f); m->m_positions[1] = Point3(0.0f, 0.0f, radius); @@ -827,7 +827,6 @@ Mesh* CreateDiscMesh(float radius, uint32_t segments) nextVert = 1; m->m_positions[nextVert] = Point3(radius*Sin((float(i)/segments)*k2Pi), 0.0f, radius*Cos((float(i)/segments)*k2Pi)); - m->m_normals[nextVert] = Vector3(0.0f, 1.0f, 0.0f); m->m_indices.push_back(0); m->m_indices.push_back(i); |