Class FloorRenderer

java.lang.Object
mindustry.graphics.FloorRenderer

public class FloorRenderer extends Object
general implementation: caching: 1. create fixed-size float array for rendering into 2. for each chunk, cache each layer into buffer; record layer boundary indices (alternatively, create mesh per layer for fast recache) 3. create mesh for this chunk based on buffer size, copy buffer into mesh rendering: 1. iterate through visible chunks 2. activate the shader vertex attributes beforehand 3. bind each mesh individually, draw it
  • Constructor Details

    • FloorRenderer

      public FloorRenderer()
  • Method Details

    • recacheTile

      public void recacheTile(Tile tile)
      Queues up a cache change for a tile. Only runs in render loop.
    • drawFloor

      public void drawFloor()
    • beginc

      public void beginc()
    • endc

      public void endc()
    • checkChanges

      public void checkChanges()
    • beginDraw

      public void beginDraw()
    • endDraw

      public void endDraw()
    • drawLayer

      public void drawLayer(CacheLayer layer)
    • clearTiles

      public void clearTiles()