CircleDrawer
A utility class designed for efficient rendering of circles.
This class manages the creation and maintenance of vertex buffers, shader programs, and batch rendering for drawing circles. It provides various methods to render single or multiple circles with configurable positions, radii, and styles.
The CircleDrawer
class is optimized for performance by batching rendering operations and dynamically resizing buffers as needed.
Functions
Link copied to clipboard
fun drawCircle(drawContext: DrawContext, drawStyle: DrawStyle, x: Double, y: Double, radius: Double)
Link copied to clipboard
fun drawCircles(drawContext: DrawContext, drawStyle: DrawStyle, positions: List<Vector2>, radius: Double)
fun drawCircles(drawContext: DrawContext, drawStyle: DrawStyle, positions: List<Vector2>, radii: List<Double>)
fun drawCircles(drawContext: DrawContext, drawStyle: DrawStyle, circleBatch: CircleBatch, count: Int)