From 56e8e3de24e7fea36f165b653a8efc8c38145d4c Mon Sep 17 00:00:00 2001 From: rodri Date: Sat, 17 Aug 2024 12:17:46 +0000 Subject: unify drawing routines and add clipped fb drawing support. now changing the viewport offset will correctly show the portion of the framebuffer that's visible, including support for upscaled views. --- camera.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'camera.c') diff --git a/camera.c b/camera.c index e67601f..ccd1f57 100644 --- a/camera.c +++ b/camera.c @@ -114,6 +114,10 @@ Cam(Rectangle vr, Renderer *r, Projection p, double fov, double n, double f) c = newcamera(); c->view = mkviewport(vr); + if(c->view == nil){ + werrstr("mkviewport: %r"); + return nil; + } c->rctl = r; configcamera(c, p, fov, n, f); return c; -- cgit v1.2.3