summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-05-13 12:17:13 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-05-13 12:17:13 -0400
commit3070d1e082af44aced65afb045ae02232ada0fb5 (patch)
tree31cbce297e4b9a981892b33879941a0d7144b187
parentffd9d5164dcb103258bbc0e788c9b04c3ce52aca (diff)
Remove viewport from regions.
Not needed now that regions are rendered to framebuffers.
-rw-r--r--catbird/region.scm14
1 files changed, 3 insertions, 11 deletions
diff --git a/catbird/region.scm b/catbird/region.scm
index c7620ad..7e9f9df 100644
--- a/catbird/region.scm
+++ b/catbird/region.scm
@@ -30,7 +30,6 @@
#:use-module (chickadee data array-list)
#:use-module (chickadee graphics engine)
#:use-module (chickadee graphics framebuffer)
- #:use-module (chickadee graphics viewport)
#:use-module (chickadee graphics sprite)
#:use-module (chickadee math matrix)
#:use-module (chickadee math rect)
@@ -60,7 +59,6 @@
(area #:accessor area #:init-keyword #:area)
(camera #:accessor camera #:init-keyword #:camera #:init-value #f)
(scene-state #:accessor scene-state #:init-thunk make-pushdown-state)
- (viewport #:accessor viewport)
(framebuffer #:accessor framebuffer)
(framebuffer-rect #:accessor framebuffer-rect)
;; Regions can be frozen for debugging purposes, so that the scene
@@ -91,11 +89,6 @@
(define-method (initialize (region <region>) args)
(next-method)
(let ((r (area region)))
- (set! (viewport region)
- (make-viewport (float->int (rect-x r))
- (float->int (rect-y r))
- (float->int (rect-width r))
- (float->int (rect-height r))))
(set! (framebuffer region)
(make-framebuffer (float->int (rect-width r))
(float->int (rect-height r))))
@@ -167,7 +160,6 @@
(with-framebuffer fb
(with-projection (projection-matrix (camera region))
(render/around s alpha))))
- (with-graphics-state ((g:viewport (viewport region)))
- (draw-sprite* (framebuffer-texture fb)
- (framebuffer-rect region)
- %identity-matrix))))))
+ (draw-sprite* (framebuffer-texture fb)
+ (framebuffer-rect region)
+ %identity-matrix)))))