Skip to content
Prev Previous commit
Next Next commit
Fixed concurrent vertices access
  • Loading branch information
emyfops committed Aug 23, 2025
commit 1be7135fb7617dfdc5aed07236cf804f8e62e5af
4 changes: 2 additions & 2 deletions src/main/kotlin/com/lambda/graphics/pipeline/VertexBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import org.joml.Vector4d
class VertexBuilder(
private val direct: VertexPipeline? = null
) {
val vertices by lazy { mutableListOf<Attribute>() }
val indices by lazy { mutableListOf<Int>() }
val vertices by lazy(LazyThreadSafetyMode.PUBLICATION) { mutableListOf<Attribute>() }
val indices by lazy(LazyThreadSafetyMode.PUBLICATION) { mutableListOf<Int>() }

private var verticesCounter = 0

Expand Down