Class TerrainRenderer

java.lang.Object
engine.renderEngine.TerrainRenderer

public class TerrainRenderer extends Object
This class is responsible for rendering all terrain elements on the grid.
  • Constructor Details

    • TerrainRenderer

      public TerrainRenderer(TerrainShader shader, org.joml.Matrix4f projectionMatrix)
      Constructor which starts the shader and loads the projection matrix in the shader.
      Parameters:
      shader -
      projectionMatrix -
  • Method Details

    • render

      public void render(Map<TextureAttribute,List<Terrain>> terrains)
      Terrains are stored in the hashmap Render function prepares each type of TexturedModel and the prepares each individual instance of that model before drawing it to the screen.
      Parameters:
      terrains -