diff options
-rw-r--r-- | src/ui/visbuf.c | 8 | ||||
-rw-r--r-- | src/ui/visbuf.h | 1 |
2 files changed, 9 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 | ||
126 | void 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 | |||
126 | void draw_VisBuf(const iVisBuf *d, iInt2 topLeft) { | 134 | void 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) { |
diff --git a/src/ui/visbuf.h b/src/ui/visbuf.h index f383789c..4b0908f9 100644 --- a/src/ui/visbuf.h +++ b/src/ui/visbuf.h | |||
@@ -47,6 +47,7 @@ void invalidate_VisBuf (iVisBuf *); | |||
47 | void alloc_VisBuf (iVisBuf *, const iInt2 size, int granularity); | 47 | void alloc_VisBuf (iVisBuf *, const iInt2 size, int granularity); |
48 | void dealloc_VisBuf (iVisBuf *); | 48 | void dealloc_VisBuf (iVisBuf *); |
49 | void reposition_VisBuf (iVisBuf *, const iRangei vis); | 49 | void reposition_VisBuf (iVisBuf *, const iRangei vis); |
50 | void validate_VisBuf (iVisBuf *); | ||
50 | 51 | ||
51 | void invalidRanges_VisBuf (const iVisBuf *, const iRangei full, iRangei *out_invalidRanges); | 52 | void invalidRanges_VisBuf (const iVisBuf *, const iRangei full, iRangei *out_invalidRanges); |
52 | void draw_VisBuf (const iVisBuf *, iInt2 topLeft); | 53 | void draw_VisBuf (const iVisBuf *, iInt2 topLeft); |