+
+ glPopMatrix();
+}
+
+static void draw_node_name(FSNode *node, float angle, float ypos, float dist, bool full)
+{
+ dtx_use_font(fat_font, FAT_FONT_SZ);
+ int line_height = dtx_line_height();
+
+ int nlines = full ? node->name_lines.size() : 1;
+ for(int i=0; i<nlines; i++) {
+ const char *name = full ? node->name_lines[i].c_str() : node->short_name.c_str();
+ glPushMatrix();
+ Mat4 xform;
+ xform.translate(-dtx_string_width(name) / 2.0, -line_height * i, 0);
+ if(node->type == FSTYPE_DIR) {
+ xform.rotate_z(deg_to_rad(90));
+ xform.rotate_x(deg_to_rad(-90));
+ xform.scale(0.0017);
+ } else {
+ xform.scale(0.0012);
+ }
+ xform.translate(0, ypos, -dist);
+ xform.rotate_y(angle);
+ glMultMatrixf(xform[0]);
+
+ glUseProgram(font_sdr);
+ set_uniform_float(font_sdr, "height", line_height);
+ dtx_string(name);
+ glPopMatrix();
+ }