(bind-func Shader_print_info_log
(let ((max_log_length 4096)
(logbuf:i8* (zalloc max_log_length)))
(lambda (shader:Shader*)
(let ((len_ptr (salloc 1 i32)))
(glGetShaderInfoLog (Shader_id shader)
max_log_length
len_ptr
logbuf)
(printf "%sShader: %s\n"
(cond ((= (Shader_type shader) GL_VERTEX_SHADER)
"Vert")
((= (Shader_type shader) GL_FRAGMENT_SHADER)
"Frag")
((= (Shader_type shader) GL_GEOMETRY_SHADER)
"Geom")
(else ""))
(if (= (pref len_ptr 0) 0)
"OK"
logbuf))
(if (= (pref len_ptr 0) 0) 0 1)))))