+void print_text(const Vec2 &pos, const Vec3 &color, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ print_textv(pos, color, fmt, ap);
+ va_end(ap);
+}
+
+void print_textv(const Vec2 &pos, const Vec3 &color, const char *fmt, va_list ap)
+{
+ char buf[512];
+
+ init();
+
+ vsnprintf(buf, sizeof buf, fmt, ap);
+
+ Text *tx = new Text;
+ int len = strlen(buf);
+ tx->str = new char[len + 1];
+ memcpy(tx->str, buf, len + 1);
+ tx->color = color;
+ tx->pos = Vec2(pos.x, -pos.y);
+
+ tx->next = txlist;
+ txlist = tx;
+}
+