don't create shadow geometry GL objects right away
This commit is contained in:
parent
6584087842
commit
d7c16697be
@ -207,9 +207,9 @@ class ClientChunk(world: ClientWorld, pos: ChunkPos) : Chunk<ClientWorld, Client
|
||||
}
|
||||
|
||||
private inner class ShadowGeometryTracker(val x: Int, val y: Int) : GPULightRenderer.ShadowGeometryRenderer {
|
||||
private val hardShadowGeometry = StatefulVertexBuilder(state, GPULightRenderer.SHADOW_FORMAT, GeometryType.LINES)
|
||||
private val hardShadowGeometry by lazy(LazyThreadSafetyMode.NONE) { StatefulVertexBuilder(state, GPULightRenderer.SHADOW_FORMAT, GeometryType.LINES) }
|
||||
private var hardShadowGeometryRev = -1
|
||||
private val softShadowGeometry = StatefulVertexBuilder(state, GPULightRenderer.SHADOW_FORMAT_SOFT, GeometryType.QUADS_ALTERNATIVE)
|
||||
private val softShadowGeometry by lazy(LazyThreadSafetyMode.NONE) { StatefulVertexBuilder(state, GPULightRenderer.SHADOW_FORMAT_SOFT, GeometryType.QUADS_ALTERNATIVE) }
|
||||
private var softShadowGeometryRev = -1
|
||||
|
||||
private fun buildGeometry(builder: StatefulVertexBuilder, line: (StatefulVertexBuilder, Float, Float, Float, Float) -> Unit) {
|
||||
|
Loading…
Reference in New Issue
Block a user