Using polygons Calculating corner coordinates is easy. Just find a point from circle and build triangles like in picture above. float anglerad = PI * angle / 180.0f; float x = sinf(anglerad) * radius; float y = cosf(anglerad) * radius; It will still have sharp edges, but more points make corners more round.
How to make rounded rectangle in OpenGL, or any polygon with rounded corners?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With