Fix part of T50634: Hair Primitive as Triangles + Hair shader with a texture = crash

Wrong formula was used to calculate needed verts and tris to be reserved.
This commit is contained in:
Sergey Sharybin 2017-02-27 13:39:23 +01:00
parent 00ceb6d2f4
commit 209a64111e
1 changed files with 2 additions and 2 deletions

View File

@ -434,8 +434,8 @@ static void ExportCurveTriangleGeometry(Mesh *mesh,
if(CData->curve_keynum[curve] <= 1 || CData->curve_length[curve] == 0.0f)
continue;
numverts += (CData->curve_keynum[curve] - 2)*2*resolution + resolution;
numtris += (CData->curve_keynum[curve] - 2)*resolution;
numverts += (CData->curve_keynum[curve] - 1)*resolution + resolution;
numtris += (CData->curve_keynum[curve] - 1)*2*resolution;
}
}