Revisited all examples and updated.
[cl-glfw.git] / examples / listmodes.lisp
blobee758e998b683832991af300acb8960876d1b568
1 (require '#:asdf)
2 (asdf:oos 'asdf:load-op '#:cl-glfw)
4 (glfw:with-init
5 (destructuring-bind (width height redbits greenbits bluebits) (glfw:get-desktop-mode)
6 (format t "Desktop mode: ~d x ~d x ~d~%" width height (+ redbits greenbits bluebits)))
8 (format t "Available modes:~%")
9 (loop for i from 0
10 for mode in (glfw:get-video-modes 400)
11 do (destructuring-bind (width height redbits greenbits bluebits) mode
12 (format t "~3d: ~d x ~d x ~d~%" i width height (+ redbits greenbits bluebits)))))