+ GL::push_matrix();
+ GL::translate(-500, 360, 0);
+ unsigned n=0;
+ for(map<unsigned, GL::Color>::iterator i=port_colors.begin(); (i!=port_colors.end() && n<20); ++i, ++n)
+ {
+ GL::Color &color=i->second;
+
+ imm.begin(GL::QUADS);
+ imm.color(color.r, color.g, color.b, color.a);
+ for(unsigned x=0; x<=4; x+=2)
+ {
+ imm.vertex(x+0, 0);
+ imm.vertex(x+10, 0);
+ imm.vertex(x+10, 10);
+ imm.vertex(x+0, 10);
+ }
+ imm.end();
+
+ GL::translate(0, -12, 0);
+ }
+ GL::pop_matrix();
+
+ GL::push_matrix();
+ if(draw_labels)
+ {
+ GL::push_matrix();
+ GL::translate(-484, 361, 0);
+ GL::scale_uniform(10);
+ glColor4f(1.0, 1.0, 1.0, 1.0);
+ n=0;
+ for(map<unsigned, GL::Color>::iterator i=port_colors.begin(); (i!=port_colors.end() && n<20); ++i, ++n)
+ {
+ font->draw_string(format("%d", i->first));
+
+ GL::translate(0, -1.2, 0);
+ }
+ GL::pop_matrix();
+ GL::Texture::unbind();
+ }
+ GL::pop_matrix();
+
+ GL::push_matrix();
+ GL::translate(-500, -360, 0);