crude legacy GL backend w/ anti aliasing

This commit is contained in:
2022-11-16 04:46:33 +11:00
parent fc9a6571ec
commit 9ba7a3bda8
5 changed files with 197 additions and 3 deletions

4
draw.c
View File

@ -4,6 +4,8 @@
static SDL_Renderer* rend = NULL;
void DrawWindowHints(void) {}
int InitDraw(SDL_Window* window)
{
const int rendflags = SDL_RENDERER_PRESENTVSYNC;
@ -68,7 +70,7 @@ void DrawCircleSteps(int x, int y, int r, int steps)
double stepsz = (double)TAU / steps;
int lastx = r;
int lasty = 0;
for (int i = 0; i <= steps; ++i)
for (int i = 1; i <= steps; ++i)
{
const double mag = (double)r;
int ofsx = (int)round(cos(stepsz * i) * mag);