(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>"
(tref vbo 0)
(let ((type (VBO_type vbo)))
(cond ((= type GL_BYTE) "byte")
((= type GL_SHORT) "short")
((= type GL_INT) "int")
((= type GL_FLOAT) "float")
(else "unknown")))
(tref vbo 2)
(tref vbo 3)))
(String s))))