diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-12 22:16:23 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-12 22:16:23 +0300 |
commit | 804c677bc9f9a3c89de257a1e6b14be27dea999b (patch) | |
tree | b8770919de82a97298e4b62971da340b839c489c /src/ui/visbuf.c | |
parent | f7e2ac29ea9d312ef6c9be4ce015676e2e78027b (diff) |
VisBuf: Method for marking textures as valid
Diffstat (limited to 'src/ui/visbuf.c')
-rw-r--r-- | src/ui/visbuf.c | 8 |
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 | ||
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) { |