mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 19:10:38 +02:00
minor cleanup
This commit is contained in:
parent
6446c7c302
commit
304c313db7
1 changed files with 2 additions and 2 deletions
|
@ -178,14 +178,14 @@ btTriangleIndexVertexArray* createStaticMeshArray(const ShapeInfo& info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ShapeInfo::TriangleIndices& triangleIndices = info.getTriangleIndices();
|
const ShapeInfo::TriangleIndices& triangleIndices = info.getTriangleIndices();
|
||||||
if (triangleIndices.size() < 3) {
|
int32_t numIndices = triangleIndices.size();
|
||||||
|
if (numIndices < 3) {
|
||||||
// not enough indices to make a single triangle
|
// not enough indices to make a single triangle
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// allocate mesh buffers
|
// allocate mesh buffers
|
||||||
btIndexedMesh mesh;
|
btIndexedMesh mesh;
|
||||||
int32_t numIndices = triangleIndices.size();
|
|
||||||
const int32_t VERTICES_PER_TRIANGLE = 3;
|
const int32_t VERTICES_PER_TRIANGLE = 3;
|
||||||
mesh.m_numTriangles = numIndices / VERTICES_PER_TRIANGLE;
|
mesh.m_numTriangles = numIndices / VERTICES_PER_TRIANGLE;
|
||||||
if (numIndices < INT16_MAX) {
|
if (numIndices < INT16_MAX) {
|
||||||
|
|
Loading…
Reference in a new issue