Skip to content

Commit 27f2cf6

Browse files
fix: Use TRIANGLES for drawFilledBoundingBox
1 parent db12f8e commit 27f2cf6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/catlas/Catlas.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ object Catlas : EventSubscriber {
143143
matrices.push()
144144
DrawHelper.cameraOffset(matrices)
145145
val linesBuffer = UBufferBuilder.create(UGraphics.DrawMode.LINES, UGraphics.CommonVertexFormats.POSITION_COLOR)
146-
val trianglesBuffer = UBufferBuilder.create(UGraphics.DrawMode.TRIANGLES, UGraphics.CommonVertexFormats.POSITION_COLOR)
146+
val trianglesBuffer = UBufferBuilder.create(UGraphics.DrawMode.TRIANGLES, UGraphics.CommonVertexFormats.POSITION_COLOR)
147147
doors.forEach {
148148
matrices.push()
149149
matrices.translate(it.x.toDouble(), 0.0, it.z.toDouble())

mod/src/main/kotlin/gg/skytils/skytilsmod/utils/RenderUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object RenderUtil {
8282
block(this.red, this.green, this.blue, this.alpha)
8383

8484
fun drawFilledBoundingBox(matrixStack: UMatrixStack, aabb: Box, c: Color, alphaMultiplier: Float = 1f, throughWalls: Boolean = false) {
85-
val buffer = UBufferBuilder.create(UGraphics.DrawMode.QUADS, UGraphics.CommonVertexFormats.POSITION_COLOR)
85+
val buffer = UBufferBuilder.create(UGraphics.DrawMode.TRIANGLES, UGraphics.CommonVertexFormats.POSITION_COLOR)
8686
DrawHelper.writeFilledCube(buffer, matrixStack, aabb, c.multAlpha(alphaMultiplier))
8787
buffer.build()?.drawAndClose(if (throughWalls) SRenderPipelines.noDepthBoxPipeline else SRenderPipelines.boxPipeline)
8888
}

0 commit comments

Comments
 (0)