diff options
author | rodri <rgl@antares-labs.eu> | 2024-03-26 10:42:23 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-03-26 10:42:23 +0000 |
commit | 02c06cfbc711c01d22bb0c52f8440f7060c10916 (patch) | |
tree | f5272530117eb133813c05949ebc8919544eb4f2 /camera.c | |
parent | 0874435504c0816c0e5f11a2e852507626fe185e (diff) | |
download | libgraphics-02c06cfbc711c01d22bb0c52f8440f7060c10916.tar.gz libgraphics-02c06cfbc711c01d22bb0c52f8440f7060c10916.tar.bz2 libgraphics-02c06cfbc711c01d22bb0c52f8440f7060c10916.zip |
pass a Viewport in the Renderjob instead of a fb.
do the frame buffer clearing and swapping as part
of the rendering process, not within shootcamera.
Diffstat (limited to 'camera.c')
-rw-r--r-- | camera.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -86,17 +86,15 @@ shootcamera(Camera *c, Shadertab *s) job = emalloc(sizeof *job); memset(job, 0, sizeof *job); - job->fb = c->vp->fbctl->fb[c->vp->fbctl->idx^1]; /* address the back buffer */ + job->v = c->vp; job->scene = c->s; job->shaders = s; job->donec = chancreate(sizeof(void*), 0); - c->vp->fbctl->reset(c->vp->fbctl); t0 = nanosec(); sendp(c->rctl->c, job); recvp(job->donec); t1 = nanosec(); - c->vp->fbctl->swap(c->vp->fbctl); chanfree(job->donec); free(job); |