diff options
author | David Thompson <dthompson2@worcester.edu> | 2016-02-27 22:38:13 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2016-02-27 22:38:13 -0500 |
commit | 8209011c3c84780ed4652c7636e92b1a1d80d4ff (patch) | |
tree | a361bb5f6167c991dcec7b07b8c8ea03d4721c55 /sly/render | |
parent | 873d00e01e7d714fd3cbbb86d3da88380c179145 (diff) |
math: Rewrite rect to use packed f64 bytevectors.
Diffstat (limited to 'sly/render')
-rw-r--r-- | sly/render/viewport.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sly/render/viewport.scm b/sly/render/viewport.scm index 054646e..eb02825 100644 --- a/sly/render/viewport.scm +++ b/sly/render/viewport.scm @@ -79,10 +79,13 @@ values for CLEAR-FLAGS are 'color-buffer', 'depth-buffer', "Set the OpenGL state for VIEWPORT. Clip rendering to the viewport area, set the clear color, and clear necessary buffers." (gl-enable (enable-cap scissor-test)) - (match (viewport-area viewport) - (($ <rect> x y width height) - (gl-viewport x y width height) - (gl-scissor x y width height))) + (let* ((rect (viewport-area viewport)) + (x (inexact->exact (rect-x rect))) + (y (inexact->exact (rect-y rect))) + (width (inexact->exact (rect-width rect))) + (height (inexact->exact (rect-height rect)))) + (gl-viewport x y width height) + (gl-scissor x y width height)) (match (viewport-clear-color viewport) (($ <color> r g b a) (gl-clear-color r g b a)))) |