rename
This commit is contained in:
parent
122a951b56
commit
32c2932a6a
@ -1,7 +1,7 @@
|
||||
package ru.dbotthepony.kstarbound.client
|
||||
|
||||
import ru.dbotthepony.kstarbound.client.gl.GLStateTracker
|
||||
import ru.dbotthepony.kstarbound.client.render.BakedStaticMesh
|
||||
import ru.dbotthepony.kstarbound.client.render.ConfiguredStaticMesh
|
||||
import ru.dbotthepony.kstarbound.client.render.EntityRenderer
|
||||
import ru.dbotthepony.kstarbound.client.render.ILayeredRenderer
|
||||
import ru.dbotthepony.kstarbound.client.render.TileLayerList
|
||||
@ -25,7 +25,7 @@ class ClientChunk(world: ClientWorld, pos: ChunkPos) : Chunk<ClientWorld, Client
|
||||
|
||||
private inner class TileLayerRenderer(private val layerChangeset: () -> Int, private val isBackground: Boolean) : AutoCloseable {
|
||||
private val layers = TileLayerList()
|
||||
val bakedMeshes = LinkedList<Pair<BakedStaticMesh, Int>>()
|
||||
val bakedMeshes = LinkedList<Pair<ConfiguredStaticMesh, Int>>()
|
||||
private var changeset = -1
|
||||
|
||||
fun bake(view: ITileChunk) {
|
||||
@ -74,7 +74,7 @@ class ClientChunk(world: ClientWorld, pos: ChunkPos) : Chunk<ClientWorld, Client
|
||||
|
||||
fun uploadStatic(clear: Boolean = true) {
|
||||
for ((baked, builder, zLevel) in layers.buildSortedLayerList()) {
|
||||
bakedMeshes.add(BakedStaticMesh(baked, builder) to zLevel)
|
||||
bakedMeshes.add(ConfiguredStaticMesh(baked, builder) to zLevel)
|
||||
}
|
||||
|
||||
if (clear) {
|
||||
@ -106,7 +106,7 @@ class ClientChunk(world: ClientWorld, pos: ChunkPos) : Chunk<ClientWorld, Client
|
||||
bakedMeshes.clear()
|
||||
|
||||
for ((baked, builder, zLevel) in layers.buildSortedLayerList()) {
|
||||
bakedMeshes.add(BakedStaticMesh(baked, builder) to zLevel)
|
||||
bakedMeshes.add(ConfiguredStaticMesh(baked, builder) to zLevel)
|
||||
}
|
||||
|
||||
layers.clear()
|
||||
@ -133,7 +133,7 @@ class ClientChunk(world: ClientWorld, pos: ChunkPos) : Chunk<ClientWorld, Client
|
||||
val debugCollisions get() = world.client.settings.debugCollisions
|
||||
val posVector2d = Vector2d(x = pos.x * CHUNK_SIZEd, y = pos.y * CHUNK_SIZEd)
|
||||
|
||||
private val unloadableBakedMeshes = ArrayList<BakedStaticMesh>()
|
||||
private val unloadableBakedMeshes = ArrayList<ConfiguredStaticMesh>()
|
||||
|
||||
private val foregroundRenderer = TileLayerRenderer(foreground::changeset, isBackground = false)
|
||||
private val backgroundRenderer = TileLayerRenderer(background::changeset, isBackground = true)
|
||||
|
@ -39,7 +39,7 @@ open class ConfiguredShaderProgram(
|
||||
* Запечённый статичный меш, позволяет быстро отрисовать меш со всеми параметрами
|
||||
* с заданной матрицей трансформации
|
||||
*/
|
||||
class BakedStaticMesh(
|
||||
class ConfiguredStaticMesh(
|
||||
val programState: ConfiguredShaderProgram,
|
||||
val indexCount: Int,
|
||||
val vao: GLVertexArrayObject,
|
||||
|
Loading…
Reference in New Issue
Block a user