TextRunGuiElementRenderState

class TextRunGuiElementRenderState(pipeline: RenderPipeline, page: GlyphPage, pose: Matrix3x2f, scissorArea: ScreenRectangle?) : RecyclableGuiElementRenderState

A run of textured quads that share one pose, pipeline and texture, submitted as a single GUI element.

Batching keeps a text of N glyphs at one element and one pooled pose instead of N of each, and it keeps bounds null so glyphs stay out of the per element intersection checks.

Constructors

Link copied to clipboard
constructor(pipeline: RenderPipeline, page: GlyphPage, pose: Matrix3x2f, scissorArea: ScreenRectangle?)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun accepts(page: GlyphPage, scissorArea: ScreenRectangle?): Boolean

Whether a quad can still join this run.

Link copied to clipboard
fun addQuad(quad: FloatArray, argb: Int)
Link copied to clipboard
open override fun bounds(): ScreenRectangle?
Link copied to clipboard
open override fun buildVertices(vertices: VertexConsumer)
Link copied to clipboard
open override fun pipeline(): RenderPipeline
Link copied to clipboard
open override fun recycle()

Releases all resources owned by this state after the GUI frame has been rendered.

Link copied to clipboard
open override fun scissorArea(): ScreenRectangle?
Link copied to clipboard
open override fun textureSetup(): TextureSetup