;; these ones are handy when you want to create a new shader program
;; directly from the sources
(bind-func ShaderProgram
"compile and link shader program (vert and frag shader source)"
(lambda (name:String* vsource:String* fsource:String*)
(let ((vert (Shader vsource GL_VERTEX_SHADER))
(frag (Shader fsource GL_FRAGMENT_SHADER)))
(gl_print_error "Error compiling Shaders")
(if (or (null? vert) (null? frag))
null
(ShaderProgram:[ShaderProgram*,String*,Shader*,Shader*]* name vert frag)))))