Start abstracting the rendering backend away to make it easier to switch to GPU rendering later

This commit is contained in:
2026-05-24 21:59:29 -04:00
parent 8f613397d6
commit 6314ad7f26
13 changed files with 159 additions and 82 deletions

View File

@@ -20,11 +20,11 @@ void akgl_draw_background(int w, int h)
for (x = 0; x < w; x += dx) {
/* use an 8x8 checkerboard pattern */
i = (((x ^ y) >> 3) & 1);
SDL_SetRenderDrawColor(renderer, col[i].r, col[i].g, col[i].b, col[i].a);
SDL_SetRenderDrawColor(renderer.sdl_renderer, col[i].r, col[i].g, col[i].b, col[i].a);
rect.x = (float)x;
rect.y = (float)y;
SDL_RenderFillRect(renderer, &rect);
SDL_RenderFillRect(renderer.sdl_renderer, &rect);
}
}
}