From 17beb406f2033ef522b0aebee07bae64317fa8fe Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 30 Apr 2022 10:13:23 -0700 Subject: til_fb: add draw flags for controlling texturability Just adds TIL_FB_DRAW_FLAG_TEXTURABLE so callers can granularly inhibit texturing if desired. --- src/modules/swarm/swarm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/swarm') diff --git a/src/modules/swarm/swarm.c b/src/modules/swarm/swarm.c index e2381ab..2d37e28 100644 --- a/src/modules/swarm/swarm.c +++ b/src/modules/swarm/swarm.c @@ -333,7 +333,7 @@ static void swarm_draw_as_points(swarm_context_t *ctxt, til_fb_fragment_t *fragm boid_t *b = &ctxt->boids[i]; v2f_t nc = swarm_scale(swarm_project_point(ctxt, &b->position), scale); - til_fb_fragment_put_pixel_checked(fragment, nc.x, nc.y, color); + til_fb_fragment_put_pixel_checked(fragment, TIL_FB_DRAW_FLAG_TEXTURABLE, nc.x, nc.y, color); } } @@ -357,7 +357,7 @@ static void draw_line_unchecked(til_fb_fragment_t *fragment, int x1, int y1, int minor -= x_delta; } /* XXX FIXME: segfaults occasionally when _unchecked !!! */ - til_fb_fragment_put_pixel_checked(fragment, x1, y1, color); + til_fb_fragment_put_pixel_checked(fragment, TIL_FB_DRAW_FLAG_TEXTURABLE, x1, y1, color); } } else { /* Y-major */ @@ -368,7 +368,7 @@ static void draw_line_unchecked(til_fb_fragment_t *fragment, int x1, int y1, int } /* XXX FIXME: segfaults occasionally when _unchecked !!! */ - til_fb_fragment_put_pixel_checked(fragment, x1, y1, color); + til_fb_fragment_put_pixel_checked(fragment, TIL_FB_DRAW_FLAG_TEXTURABLE, x1, y1, color); } } } -- cgit v1.2.3