Skip to content
Permalink
Browse files

Fix glfw backend for systems on which framebuffer size does not corre…

…spond to window size.
  • Loading branch information...
Shinmera committed Nov 6, 2019
1 parent ff4d30f commit 36ff3634b29c8be437bd411be8162c59ecc5c353
Showing with 3 additions and 3 deletions.
  1. +3 −3 backends/glfw/context.lisp
@@ -165,10 +165,10 @@
(cl-glfw3:set-window-title value (window context)))

(defmethod width ((context context))
(first (cl-glfw3:get-window-size (window context))))
(first (cl-glfw3:get-framebuffer-size (window context))))

(defmethod height ((context context))
(second (cl-glfw3:get-window-size (window context))))
(second (cl-glfw3:get-framebuffer-size (window context))))

(defmethod profile ((context context))
(ecase (cl-glfw3:get-window-attribute :opengl-profile (window context))
@@ -212,7 +212,7 @@
(cl-glfw3:def-error-callback ctx-error (message)
(v:severe :trial.backend.glfw "~a" message))

(cl-glfw3:def-window-size-callback ctx-size (window w h)
(cl-glfw3:def-framebuffer-size-callback ctx-size (window w h)
(%with-context
(handle (make-instance 'resize
:width w

0 comments on commit 36ff363

Please sign in to comment.
You can’t perform that action at this time.