fix GuiMesh order

This commit is contained in:
Moritz Zwerger 2023-10-24 23:49:48 +02:00
parent 0d5d62ece1
commit 6d25ed7ecb
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -30,6 +30,8 @@ class GUIMesh(
data: FragmentedArrayFloatList,
) : Mesh(context, GUIMeshStruct, initialCacheSize = 40000, clearOnLoad = false, data = data), GUIVertexConsumer {
private val whiteTexture = context.textures.whiteTexture
override val order = context.system.quadOrder
override fun addVertex(x: Float, y: Float, texture: ShaderTexture?, u: Float, v: Float, tint: RGBColor, options: GUIVertexOptions?) {
addVertex(data, halfSize, x, y, texture ?: whiteTexture.texture, u, v, tint, options)