(bind-func print
(let ((max_log_length 4096)
(logbuf:i8* (zalloc max_log_length)))
(lambda (program:ShaderProgram*)
(if (null? program)
(begin (println "NULL SHADER PROGRAM!") void)
(let ((len_ptr (salloc 1 i32)))
(glGetProgramInfoLog (id program)
max_log_length
len_ptr
logbuf)
(println "ShaderProgram: " (tref program 4))
(printf "%s\n"
(if (= (pref len_ptr 0) 0)
"OK"
logbuf))
(if (= (pref len_ptr 0) 0) 0 1)
void)))))