Core profile renderer skeleton

This commit is contained in:
2022-11-19 03:03:02 +11:00
parent 2112643e94
commit e91404b02f
8 changed files with 659 additions and 41 deletions

View File

@@ -62,11 +62,6 @@ void DrawLine(int x1, int y1, int x2, int y2)
SDL_RenderDrawLine(rend, x1, y1, x2, y2);
}
void DrawCircle(int x, int y, int r)
{
DrawCircleSteps(x, y, r, (int)(sqrt((double)r) * 8.0));
}
void DrawCircleSteps(int x, int y, int r, int steps)
{
double stepsz = (double)TAU / steps;
@@ -87,12 +82,6 @@ void DrawCircleSteps(int x, int y, int r, int steps)
}
}
void DrawArc(int x, int y, int r, int startAng, int endAng)
{
const int steps = (int)(sqrt((double)r) * (double)abs(endAng - startAng) / 360.0 * 8.0);
DrawArcSteps(x, y, r, startAng, endAng, steps);
}
void DrawArcSteps(int x, int y, int r, int startAng, int endAng, int steps)
{
const double fstart = (double)startAng * DEG2RAD;