protected void endShapeLighting(boolean lights) {
    if (lights) {
      // If the lighting does not depend on vertex position and there is a single
      // normal specified for this shape, go ahead and apply the same lighting
      // contribution to every vertex in this shape (one lighting calc!)
      if (!lightingDependsOnVertexPosition && normalMode == NORMAL_MODE_SHAPE) {
        calcLightingContribution(shapeFirst, tempLightingContribution);
        for (int tri = 0; tri < triangleCount; tri++) {
          lightTriangle(tri, tempLightingContribution);
        }
      } else {  // Otherwise light each triangle individually...
        for (int tri = 0; tri < triangleCount; tri++) {
          lightTriangle(tri);
        }
      }
    } else {
      for (int tri = 0; tri < triangleCount; tri++) {
        int index = triangles[tri][VERTEX1];
        copyPrelitVertexColor(tri, index, 0);
        index = triangles[tri][VERTEX2];
        copyPrelitVertexColor(tri, index, 1);
        index = triangles[tri][VERTEX3];
        copyPrelitVertexColor(tri, index, 2);
      }
    }
  }