summaryrefslogtreecommitdiff
path: root/src/ui/visbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/visbuf.c')
-rw-r--r--src/ui/visbuf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/visbuf.c b/src/ui/visbuf.c
index 107b8568..64d861c6 100644
--- a/src/ui/visbuf.c
+++ b/src/ui/visbuf.c
@@ -123,6 +123,14 @@ void invalidRanges_VisBuf(const iVisBuf *d, const iRangei full, iRangei *out_inv
123 } 123 }
124} 124}
125 125
126void validate_VisBuf(iVisBuf *d) {
127 iForIndices(i, d->buffers) {
128 iVisBufTexture *buf = &d->buffers[i];
129 buf->validRange =
130 intersect_Rangei(d->vis, (iRangei){ buf->origin, buf->origin + d->texSize.y });
131 }
132}
133
126void draw_VisBuf(const iVisBuf *d, iInt2 topLeft) { 134void draw_VisBuf(const iVisBuf *d, iInt2 topLeft) {
127 SDL_Renderer *render = renderer_Window(get_Window()); 135 SDL_Renderer *render = renderer_Window(get_Window());
128 iForIndices(i, d->buffers) { 136 iForIndices(i, d->buffers) {