GLushort *vertIdxs, GLsizei numParts, GLsizei numVertIdxsPerPart)
{
GLushort i,j;
- /* calc number of vertices to generate, allocate. TODO: FREE again after draw!
- * two for each vertex in the input shape
+ /* calc number of vertices to generate, allocate. Must be freed by caller
+ * We do the free at the end of fghDrawNormalVisualization11/fghDrawNormalVisualization20
*/
if (!vertIdxs)
numNormalVertices = numVertices * 2;
(*vertices)[idx ] = cost[j]*r;
(*vertices)[idx+1] = sint[j]*r;
(*vertices)[idx+2] = z;
- (*normals )[idx ] = cost[j]*sinn;
- (*normals )[idx+1] = sint[j]*sinn;
- (*normals )[idx+2] = cosn;
+ (*normals )[idx ] = cost[j]*cosn;
+ (*normals )[idx+1] = sint[j]*cosn;
+ (*normals )[idx+2] = sinn;
}
z += zStep;