mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 02:56:42 +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();
|
||||
if (triangleIndices.size() < 3) {
|
||||
int32_t numIndices = triangleIndices.size();
|
||||
if (numIndices < 3) {
|
||||
// not enough indices to make a single triangle
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// allocate mesh buffers
|
||||
btIndexedMesh mesh;
|
||||
int32_t numIndices = triangleIndices.size();
|
||||
const int32_t VERTICES_PER_TRIANGLE = 3;
|
||||
mesh.m_numTriangles = numIndices / VERTICES_PER_TRIANGLE;
|
||||
if (numIndices < INT16_MAX) {
|
||||
|
|
Loading…
Reference in a new issue