Class EntityRenderer

java.lang.Object
engine.renderEngine.EntityRenderer

public class EntityRenderer extends Object
This class is responsible for rendering anything considered an entity. An entity constitutes as anything that has a 3D asset. Starts the entity shaders as well as drawing every asset to the screen with the help of the shaders.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityRenderer(EntityShader shader, org.joml.Matrix4f projectionMatrix)
    Constructor which starts the shader and loads the projection matrix in the shader.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    prepareModel(TexturedModel texturedModel)
    The vertex attribute arrays for each model are enabled, the shaders are laoded with the shinedampers and reflectivity, the texture banks are activated and the texture is loaded.
    void
    Entities 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.
    void
    Disables and unbinds all the Vertex Arrays.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EntityRenderer

      public EntityRenderer(EntityShader 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<TexturedModel,List<Entity>> entities)
      Entities 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:
      entities -
    • prepareModel

      public void prepareModel(TexturedModel texturedModel)
      The vertex attribute arrays for each model are enabled, the shaders are laoded with the shinedampers and reflectivity, the texture banks are activated and the texture is loaded.
      Parameters:
      texturedModel -
    • unbindModel

      public void unbindModel()
      Disables and unbinds all the Vertex Arrays.