Package de.coreengine.rendering.renderer
Class MasterRenderer
- java.lang.Object
-
- de.coreengine.rendering.renderer.MasterRenderer
-
public class MasterRenderer extends Object
Class that manage the whole rendering system and is the contact class for rendering stuff onto the screen- Author:
- Darius Dinger
-
-
Constructor Summary
Constructors Constructor Description MasterRenderer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Camera
getCamera()
static GBuffer
getGBUFFER()
static Moon
getMoon()
Read and writeable getter for the current setted moon.static Color
getPickedColor()
static Skybox
getSkybox()
static Sun
getSun()
Read and writeable getter for the current setted sun.static void
init()
Initialize the master rendererstatic void
render()
Rendering all from the renderlists and clear renderlistsstatic void
renderAmbientLight(AmbientLight light)
Adding a new ambient light to the ambient light renderlist.static void
renderAnimatedEntity(AnimatedEntity entity)
Adding a new animated entity to the animated entity renderlist.static void
renderDirectionalLight(DirectionalLight light)
Adding a new directional light to the directional light renderlist.static void
renderEntity(Entity entity)
Adding a new entity to the entity renderlist.static void
renderGui2D(GUIPane gui)
Rendering 2 dimensional gui and all its components onto the screenstatic void
renderGui3D(GUIPane gui)
Rendering 3 dimensional gui and all its components into the worldstatic void
renderLensFlare(LensFlare lensFlare)
Rendering lens flare effect onto the screenstatic void
renderParticle(Particle particle)
Adding new particle to the particle renderlist.static void
renderPointLight(PointLight light)
Adding a new point light to the point light renderlist.static void
renderSpotLight(SpotLight light)
Adding a new spot light to the spot light renderlist.static void
renderTerrain(Terrain terrain)
Adding a new terrain to the terrain renderlist.static void
renderWater(Water water)
Adding a new water to the water renderlist.static void
setCamera(Camera cam)
Setting the camera to render next frame fromstatic void
setMoon(Moon moon)
Setting the moon to render in the next framestatic void
setShadowLight(ShadowLight shadowLight)
Setting the shadow light to render shadows from in the next framestatic void
setSkybox(Skybox skybox)
Setting the skybox to render in the next framestatic void
setSun(Sun sun)
Setting the sun to render in the next frame
-
-
-
Method Detail
-
init
public static void init()
Initialize the master renderer
-
render
public static void render()
Rendering all from the renderlists and clear renderlists
-
getPickedColor
public static Color getPickedColor()
- Returns:
- Color thats get picked by the mouse
-
renderGui2D
public static void renderGui2D(GUIPane gui)
Rendering 2 dimensional gui and all its components onto the screen- Parameters:
gui
- Gui to render
-
renderGui3D
public static void renderGui3D(GUIPane gui)
Rendering 3 dimensional gui and all its components into the world- Parameters:
gui
- Gui to render
-
renderLensFlare
public static void renderLensFlare(LensFlare lensFlare)
Rendering lens flare effect onto the screen- Parameters:
lensFlare
- Lens flare to render or null to remove lens flare
-
setCamera
public static void setCamera(Camera cam)
Setting the camera to render next frame from- Parameters:
cam
- Camera to render from
-
setSun
public static void setSun(Sun sun)
Setting the sun to render in the next frame- Parameters:
sun
- Sun to render or null to remove sun
-
setMoon
public static void setMoon(Moon moon)
Setting the moon to render in the next frame- Parameters:
moon
- Moon to render or null to remove moon
-
setSkybox
public static void setSkybox(Skybox skybox)
Setting the skybox to render in the next frame- Parameters:
skybox
- Skybox to render or null to remove skybox
-
setShadowLight
public static void setShadowLight(ShadowLight shadowLight)
Setting the shadow light to render shadows from in the next frame- Parameters:
shadowLight
- ShadowLight to render shadow from or null to remove shadows
-
getSun
public static Sun getSun()
Read and writeable getter for the current setted sun. Sun can be set with the setter or this getter can be used to modify the current sun. Contains null, if no moon is set!- Returns:
- Read/writeable current sun or null
-
getMoon
public static Moon getMoon()
Read and writeable getter for the current setted moon. Sun can be set with the setter or this getter can be used to modify the current moon. Contains null, if no moon is set!- Returns:
- Read/writeable current moon or null
-
renderTerrain
public static void renderTerrain(Terrain terrain)
Adding a new terrain to the terrain renderlist. So it will be rendered in the next frame.- Parameters:
terrain
- Terrain to add
-
renderEntity
public static void renderEntity(Entity entity)
Adding a new entity to the entity renderlist. So it will be rendered in the next frame.- Parameters:
entity
- Entity to add
-
renderAnimatedEntity
public static void renderAnimatedEntity(AnimatedEntity entity)
Adding a new animated entity to the animated entity renderlist. So it will be rendered in the next frame.- Parameters:
entity
- Entity to add
-
renderWater
public static void renderWater(Water water)
Adding a new water to the water renderlist. So it will be rendered in the next frame.- Parameters:
water
- Water to add
-
renderPointLight
public static void renderPointLight(PointLight light)
Adding a new point light to the point light renderlist. So it will be rendered in the next frame.
Maximum lights is defined by the DeferredShader.MAX_LIGHTS variable. All extra lights will not be rendered- Parameters:
light
- Point light to add
-
renderSpotLight
public static void renderSpotLight(SpotLight light)
Adding a new spot light to the spot light renderlist. So it will be rendered in the next frame.
Maximum lights is defined by the DeferredShader.MAX_LIGHTS variable. All extra lights will not be rendered- Parameters:
light
- Spot light to add
-
renderAmbientLight
public static void renderAmbientLight(AmbientLight light)
Adding a new ambient light to the ambient light renderlist. So it will be rendered in the next frame.
Maximum lights is defined by the DeferredShader.MAX_LIGHTS variable. All extra lights will not be rendered- Parameters:
light
- Ambient light to add
-
renderDirectionalLight
public static void renderDirectionalLight(DirectionalLight light)
Adding a new directional light to the directional light renderlist. So it will be rendered in the next frame.
Maximum lights is defined by the DeferredShader.MAX_LIGHTS variable. All extra lights will not be rendered- Parameters:
light
- Directional light to add
-
renderParticle
public static void renderParticle(Particle particle)
Adding new particle to the particle renderlist. So it will be rendered in the next frame- Parameters:
particle
- Particle to add
-
getGBUFFER
public static GBuffer getGBUFFER()
- Returns:
- GBuffer with the rendered scene
-
getCamera
public static Camera getCamera()
- Returns:
- Current camera, the scene gets rendered from
-
getSkybox
public static Skybox getSkybox()
- Returns:
- Current set skybox, or null when no skybox is set
-
-