+ int nchildren = (int)cur_node->children.size();
+ int ncols = std::min(cur_node->nfiles, max_ncols);
+
+ int first = start_child % ncols;
+ int col = 0, row = 0;
+
+ for(int i=0; i<nchildren; i++) {
+ int idx = (i + first) % nchildren;
+ FSNode *node = cur_node->children[idx];
+
+ if(node->type == FSTYPE_DIR) {
+ continue;
+ }
+
+ glUseProgram(0);
+
+ float angle = icon_angle(col, ncols, max_icon_angle);
+
+ Mat4 xform = base_xform;
+ xform.translate(0, row * row_spacing, -radius);
+ xform.rotate_y(angle);
+
+ glPushMatrix();
+ glMultMatrixf(xform[0]);
+ iconrend->draw(node);
+ glPopMatrix();
+
+ glPushMatrix();
+ xform = Mat4::identity;
+ xform.translate(-dtx_string_width(node->path.get_name()) / 2.0, 0, 0);
+ xform.scale(0.001);
+ xform.translate(0, 1.54 + row * row_spacing, -radius);
+ xform.rotate_y(angle);
+ glMultMatrixf(xform[0]);
+
+ glUseProgram(font_sdr);
+ dtx_string(node->path.get_name());
+ glPopMatrix();
+
+ if(++col >= ncols) {
+ col = 0;
+ ++row;
+ }
+ }