Surprisingly, the SDL library does not provide a way to draw a circle natively. Circles are usually drawn with the usage of sdl2-gfx or implementing the midpoint algorithm.
At the time of writing (11/05/2024), the sdl2-gfx library isn’t updated to be compatible with SDL3 yet. This example ports the filledCircleRGBA() method manually: https://github.com/jchai01/comp4300-with-sdl/tree/main/a1
Steps Link to heading
- Search and extract the desired function in the header file SDL2_gfxPrimitives.h
- Extract the function along with all the other function it depends on from SDL2_gfxPrimitives.c
- Fix any errors by following the SDL3 migration guide