You can export as OBJ by printing your vertex, triangle and UV arrays as plain text.
Lines of the obj file should be like these:
v 300 400 500
vt 0.0 1.0