(bind-func print ;Shader_print_info_log
(let ((max_log_length 4096)
(logbuf:i8* (zalloc max_log_length)))
(lambda (shader:Shader*)
(if (null? shader)
(begin (println "NULL SHADER!") void)
(let ((len_ptr (salloc 1 i32)))
(glGetShaderInfoLog (id shader)
max_log_length
len_ptr
logbuf)
(printf "%sShader: %s\n"
(cond ((= (type shader) GL_VERTEX_SHADER)
"Vert")
((= (type shader) GL_FRAGMENT_SHADER)
"Frag")
((= (type shader) GL_GEOMETRY_SHADER)
"Geom")
(else ""))
(if (= (pref len_ptr 0) 0)
"OK"
logbuf))
(if (= (pref len_ptr 0) 0) 0 1)
void)))))