RectangleDrawer

This class is responsible for efficiently managing and rendering 2D rectangles, supporting various configurations, including batch rendering, custom dimensions, and draw styles.

The rendering process is optimized by leveraging dynamic vertex buffers, shader management, and batching mechanisms for handling multiple rectangles in a single draw pass.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun drawRectangle(drawContext: DrawContext, drawStyle: DrawStyle, x: Double, y: Double, width: Double, height: Double)
Link copied to clipboard
fun drawRectangles(drawContext: DrawContext, drawStyle: DrawStyle, rectangles: List<Rectangle>)
fun drawRectangles(drawContext: DrawContext, drawStyle: DrawStyle, positions: List<Vector2>, dimensions: List<Vector2>)
fun drawRectangles(drawContext: DrawContext, drawStyle: DrawStyle, batch: RectangleBatch, count: Int)
fun drawRectangles(drawContext: DrawContext, drawStyle: DrawStyle, positions: List<Vector2>, width: Double, height: Double)