AlexCharlton / cl-glfw3

Common Lisp bindings to GLFW version 3.x
BSD 2-Clause "Simplified" License
89 stars 32 forks source link

window-hint is undefined outside of %glfw #33

Open ajithmk opened 4 years ago

ajithmk commented 4 years ago

I am producing a minimal example to repro the issue. I am on Linux and using sbcl.

(defpackage #:playground2
  (:nicknames :pg2)
  (:use #:cl #:cl-vulkan #:cl-glfw3)
  (:export :basic-example))

(in-package #:playground2)

(defun basic-example ()
  (with-init-window (:width 860 :height 600 :title "vulkan" :resizable 0 :client-api 0)
    (loop until (window-should-close-p)
       do (poll-events)
     )))

Now basic-example won't run for me. It complains that window-hint is undefined. I had to change (window-hint :client-api 0) to (%glfw:window-hint :client-api) in with-window macro to get it working. But strangely if I remove :resizable 0 :client-api 0 in the above code, then it does not complain about undefined window-hint.

Btw, I also noticed that there is a c enum defined with window-hint name and also a function with the same name glfw-bindings.lisp. Not sure if that is related to this issue or not though.