(bind-func print:[void,XTMMesh*]*
(lambda (mesh)
(if (null? mesh)
(println "<XTMMesh:NULL>")
(let ((name (tref mesh 11))
(texture (tref mesh 1))
(diffuse:float* (tref mesh 2))
(ambient:float* (tref mesh 3))
(specular:float* (tref mesh 4))
(emissive:float* (tref mesh 5))
(shininess:float (tref mesh 6))
(opacity:float (tref mesh 7))
(verts:i64 (tref mesh 9))
(bones:i32 (tref mesh 12))
(diffuse_tex:Texture* (tref mesh 15))
(specular_tex:Texture* (tref mesh 16))
(height_tex:Texture* (tref mesh 17))
(normal_tex:Texture* (tref mesh 18)))
(printout "------ mesh ---------")
(printout "\n name : " name)
(printout "\n texture : " texture)
(printout "\n diffuse : ") (mprint diffuse 1 4)
(printout " ambient : ") (mprint ambient 1 4)
(printout " speculr : ") (mprint specular 1 4)
(printout " emissiv : ") (mprint emissive 1 4)
(printout " shine : " shininess)
(printout "\n opacity : " opacity)
(printout "\n verts : " verts)
(printout "\n bones : " bones)
(printout "\n diff tex: " (if (null? diffuse_tex) #f #t))
(printout "\n spec tex: " (if (null? specular_tex) #f #t))
(printout "\n high tex: " (if (null? height_tex) #f #t))
(printout "\n norm tex: " (if (null? normal_tex) #f #t))
(println)
void))))