X-Git-Url: https://git.jsancho.org/?p=gacela.git;a=blobdiff_plain;f=src%2Fvideo.scm;h=a9db7be0b7e03dce39f93e0c0bb611acbd9331a9;hp=d19796e02371ffbc6563ee2902da17903f6868a1;hb=6ecc92491ec58e41fc41e3620f2e7cc6bd1534e6;hpb=3346993d550ce875c99870f8a3c097cc1a772dd3 diff --git a/src/video.scm b/src/video.scm index d19796e..a9db7be 100644 --- a/src/video.scm +++ b/src/video.scm @@ -564,18 +564,6 @@ ;;; Primitives -(define-macro (define-mesh header . body) - (let ((name (car header)) - (args (cdr header))) - `(define* ,header - (let ((m (make-mesh - ',name - (lambda (props) - (apply (lambda* ,args ,@body) - ((@ (gacela utils) arguments-apply) ,name props)))))) - (mesh-properties-set! m (list ,@(map (lambda (a) `(cons ',a ,a)) (names-arguments args)))) - m)))) - (define-macro (primitive header . body) (let* ((type (car header)) (args (cdr header)) @@ -607,8 +595,8 @@ (define-primitive (rectangle width height #:key texture color texture-coord) (draw-rectangle width height #:texture texture #:color color #:texture-coord texture-coord)) -(define-primitive (texture texture #:key (zoom 1) (sprite '((0 0) (1 1)))) - (draw-texture texture #:zoom zoom #:sprite sprite)) +(define-primitive (picture filename #:key (min-filter GL_LINEAR) (mag-filter GL_LINEAR) (zoom 1) (sprite '((0 0) (1 1)))) + (draw-texture (load-texture filename #:min-filter min-filter #:mag-filter mag-filter) #:zoom zoom #:sprite sprite)) (module-map (lambda (sym var)