ShaderProgram   xtlang


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

Implementation

;; 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)))))


Back to Index

Similar Entries

  • ShaderProgram    xtlang
  • ShaderProgram    xtlang
  • ShaderProgram    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_print_info_log    xtlang