ShaderProgram   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm

Implementation

(bind-func ShaderProgram
  "compile and link shader program (vert and frag shader source)"
  (lambda (name:String* vsource:String* gsource:String* fsource:String*)
    (let ((vert (Shader vsource GL_VERTEX_SHADER))
          (geom (Shader gsource GL_GEOMETRY_SHADER))
          (frag (Shader fsource GL_FRAGMENT_SHADER)))
      (gl_print_error "Error compiling Shaders")
      (if (or (null? vert) (null? geom) (null? frag))
          null
          (ShaderProgram:[ShaderProgram*,String*,Shader*,Shader*,Shader*]* name vert geom frag)))))


Back to Index

Similar Entries