- GList *triangles = NULL;
- if (has_children && !GRITS_OBJECT(tile)->hidden) {
- /* TODO: simplify this */
- const gdouble rows = G_N_ELEMENTS(tile->children);
- const gdouble cols = G_N_ELEMENTS(tile->children[0]);
- const gdouble lat_dist = tile->edge.n - tile->edge.s;
- const gdouble lon_dist = tile->edge.e - tile->edge.w;
- const gdouble lat_step = lat_dist / rows;
- const gdouble lon_step = lon_dist / cols;
- int row, col;
- grits_tile_foreach_index(tile, row, col) {
- GritsTile *child = tile->children[row][col];
- if (child && child->data) {
- grits_tile_draw_rec(child, opengl);
- } else {
- const gdouble n = tile->edge.n-(lat_step*(row+0));
- const gdouble s = tile->edge.n-(lat_step*(row+1));
- const gdouble e = tile->edge.w+(lon_step*(col+1));
- const gdouble w = tile->edge.w+(lon_step*(col+0));
- GList *these = roam_sphere_get_intersect(opengl->sphere,
- FALSE, n, s, e, w);
- triangles = g_list_concat(triangles, these);
- }
- }
- } else {
- triangles = roam_sphere_get_intersect(opengl->sphere, FALSE,
+ /* Draw parent tile underneath */
+ if (!has_all_children) {
+ GList *triangles = roam_sphere_get_intersect(opengl->sphere, FALSE,