I’m using SDL2 for a 2D topdown C++ game based on a Java tutorial. Is there any shape library for SDL2/3 to draw circles for spot light creation ?
I want to be able to create a light spot to create the lantern effect. In the Java tutorial use the function RadialGradientPaint(centerX, centerY, (circleSize/2), fraction, color), where “fraction” is a vector containing the transparency percentages of the circle and “color” is a vector of instances of the Java class Color(r, g, b, alpha). Is there any library that can be linked to SDL2 that has a function like RadialGradientPaint(…) ?
I really need to find it.