I’m on macOS Monterery (don’t know if that’s relevant) and just downloaded 2.0.18. I thought I’d try out the new ability to render triangles with SDL_RenderGeometry, so I called it in the following way:
SDL_Vertex vs[4] = {
{{40+40*cosf(M_PI/6), 40+40*sinf(M_PI/6) }, {0, 0, 255, 255}},
{{40+40*cosf(M_PI/6+M_PI/2), 40+40*sinf(M_PI/6+M_PI/2) }, {0, 0, 255, 255}},
{{40+40*cosf(M_PI/6+M_PI), 40+40*sinf(M_PI/6+M_PI) }, {0, 0, 255, 255}},
{{40+40*cosf(M_PI/6+3*M_PI/2), 40+40*sinf(M_PI/6+3*M_PI/2)}, {0, 0, 255, 255}},
};
int indices[6] = {0, 1, 2, 2, 3, 0};
SDL_RenderGeometry(renderer, NULL, vs, 4, indices, 6);
This results in the following image:
The edges of the square are jagged. Is that expected? It is very noticeable with small triangles. Is it possible to get smooth edges or am I using the API wrong?