AlexCharlton / cl-glfw3

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

set-window-monitor function #15

Closed borodust closed 7 years ago

borodust commented 7 years ago

Useful for setting fullscreen mode on/off dynamically.

Example usage:

(if fullscreen-p
    (let* ((monitor (glfw:get-primary-monitor))
           (video-mode (%glfw:get-video-mode monitor))
           (width (getf video-mode '%glfw:width))
           (height (getf video-mode '%glfw:height)))
      (glfw:set-window-monitor monitor width height :window window))
    (glfw:set-window-monitor nil 640 480 :window window :x-position 100 :y-position 100))
AlexCharlton commented 7 years ago

Sorry for the slow review, and thanks for the contribution!