(bind-func toString
(lambda (vbo:VBO*)
(let ((s:i8* (salloc 256)))
(if (null? vbo)
(sprintf s "<VBO: 0x0>")
(sprintf s "<VBO: id=%d type=%s nbytes=%d data=%p elements=%ld stride=%ld>"
(tref vbo 0)
(let ((t (type vbo)))
(cond ((= t GL_BYTE) "byte")
((= t GL_SHORT) "short")
((= t GL_INT) "int")
((= t GL_FLOAT) "float")
(else "unknown")))
(tref vbo 2)
(tref vbo 3)
(tref vbo 4)
(tref vbo 5)))
(String s))))