m3g/m3gcore11/src/m3g_indexbuffer.c
branchRCL_3
changeset 18 5e30ef2e26cb
parent 0 5d03bc08d59c
equal deleted inserted replaced
11:fed1595b188e 18:5e30ef2e26cb
   481 M3G_API M3Gbool m3gGetBatchIndices(M3GIndexBuffer buffer,
   481 M3G_API M3Gbool m3gGetBatchIndices(M3GIndexBuffer buffer,
   482                                    M3Gint batchIndex,
   482                                    M3Gint batchIndex,
   483                                    M3Gint *indices)
   483                                    M3Gint *indices)
   484 {
   484 {
   485     M3Gint i, j, tri = 0;
   485     M3Gint i, j, tri = 0;
   486     M3Gint triIndices[4];
   486     M3Gint triIndices[4] = {0, 0, 0, 0};
   487     M3G_VALIDATE_OBJECT(buffer);
   487     M3G_VALIDATE_OBJECT(buffer);
   488     M3G_UNREF(batchIndex);
   488     M3G_UNREF(batchIndex);
   489 
   489 
   490     for (i = 0; i < buffer->stripCount; i++) {
   490     for (i = 0; i < buffer->stripCount; i++) {
   491         for (j = 0; j < buffer->lengths[i] - 2; j++) {
   491         for (j = 0; j < buffer->lengths[i] - 2; j++) {