bind-glew   macro


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

Implementation

(define-macro (bind-glew glew-lib proc-name type . args)
  (let* ((arg-types (cddr (impc:ir:get-type-from-pretty-str (symbol->string type))))
         (arg-list (glwrapper-arg-list-symbols (length arg-types))))
    `(begin (eval (bind-lib
                    ,glew-lib
                    ,(glew-name-from-gl-name proc-name)
                    ,type)
                  (interaction-environment))
            (eval (bind-func ,proc-name
                    ;; docstring
                    ,(if (and (not (null? args)) (string? (car args)))
                         (car args)
                         "")
                    (lambda ,arg-list
                      (,(glew-name-from-gl-name proc-name)
                       ,@arg-list)))
                  (interaction-environment)))))


Back to Index