Package engine.renderEngine
Class TerrainRenderer
java.lang.Object
engine.renderEngine.TerrainRenderer
This class is responsible for rendering all terrain elements on the grid.
-
Constructor Summary
ConstructorsConstructorDescriptionTerrainRenderer
(TerrainShader shader, org.joml.Matrix4f projectionMatrix) Constructor which starts the shader and loads the projection matrix in the shader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
TerrainRenderer
Constructor which starts the shader and loads the projection matrix in the shader.- Parameters:
shader
-projectionMatrix
-
-
-
Method Details
-
render
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
-
-