gl3w pasted by logo4poop on Sat Sep 26 17:42:58 2020

70 ❯ csc recad.scm                                                                                                                                                          recad
❯ ./recad                                                                                                                                                                   recad

Error: unbound variable: gl3wInit

	Call history:

	recad.scm:1: chicken.load#load-extension
	recad.scm:1: chicken.load#load-extension
	recad.scm:4: chicken.load#load-extension
	recad.scm:6: glfw3#key-callback
	recad.scm:10: glfw3#init
	recad.scm:10: glfw3#make-window
	recad.scm:12: glfw3#window
	recad.scm:12: glfw3-bindings#swap-buffers
	recad.scm:13: glfw3-bindings#poll-events
	recad.scm:14: glfw3#window
	recad.scm:14: glfw3-bindings#window-should-close
	recad.scm:15: gl3wInit	  	<--

Source pasted by logo4poop on Sat Sep 26 18:33:50 2020

(require-extension bind coops)

(bind-file "gl3w/include/GL/gl3w.h")
(import (prefix glfw3 glfw:))

(glfw:key-callback (lambda (window key scancode action mods)
                     (cond
                      [(and (eq? key glfw:+key-escape+) (eq? action glfw:+press+))
                       (glfw:set-window-should-close window #t)])))
(glfw:with-window (640 480 "Recad" resizable: #t)
    (let loop ()
Press (glfw:swap-buffers (glfw:window))
      (glfw:poll-events)
      (unless (glfw:window-should-close (glfw:window))
        (gl3wInit)
        (glClearColor 0.18 0.2033 0.25 1.0)
        (glClear GL_COLOR_BUFFER_BIT)
        (loop)

        )))

Trivial bind-file example added by wasamasa on Sat Sep 26 18:45:34 2020

(import (chicken base))
(import bind)

#> int test() { return 42; } <#
(bind-file "test.h") ; contains a single line, "int test();"
(print (test))