(bind-func print_program_info_log
(lambda (obj:i32)
(let ((infologLength (salloc 1 i32))
(charsWritten (salloc 1 i32)))
(glGetProgramiv obj GL_INFO_LOG_LENGTH infologLength)
(if (> (pref infologLength 0) 1)
(let ((l (bitcast (malloc (convert (pref infologLength 0))) i8*)))
(glGetProgramInfoLog obj (pref infologLength 0) charsWritten l)
(printf "Program Info Log:\n %s\n" l)
(free l)
1)
(begin (printf "Program Info log: OK\n") 1)))))