Class AreaLightRenderer
java.lang.Object
foundry.veil.api.client.render.light.renderer.InstancedLightRenderer<AreaLight>
foundry.veil.impl.client.render.light.AreaLightRenderer
- All Implemented Interfaces:
LightTypeRenderer<AreaLight>
,AutoCloseable
,org.lwjgl.system.NativeResource
-
Field Summary
Fields inherited from class foundry.veil.api.client.render.light.renderer.InstancedLightRenderer
lightSize, maxLights
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
clearRenderState
(@NotNull LightRenderer lightRenderer, @NotNull List<AreaLight> lights) Clears the render state after drawing all lights.protected com.mojang.blaze3d.vertex.MeshData
protected boolean
isVisible
(AreaLight light, CullFrustum frustum) Checks whether the specified light can be seen in the specified frustum.protected void
Sets up the instanced buffer state.protected void
setupRenderState
(@NotNull LightRenderer lightRenderer, @NotNull List<AreaLight> lights) Sets up the render state for drawing all lights.Methods inherited from class foundry.veil.api.client.render.light.renderer.InstancedLightRenderer
free, getVisibleLights, prepareLights, renderLights
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
AreaLightRenderer
public AreaLightRenderer()
-
-
Method Details
-
createMesh
protected com.mojang.blaze3d.vertex.MeshData createMesh()- Specified by:
createMesh
in classInstancedLightRenderer<AreaLight>
- Returns:
- The mesh data each instanced light will be rendered with use
-
setupBufferState
protected void setupBufferState()Description copied from class:InstancedLightRenderer
Sets up the instanced buffer state.- Specified by:
setupBufferState
in classInstancedLightRenderer<AreaLight>
-
setupRenderState
protected void setupRenderState(@NotNull @NotNull LightRenderer lightRenderer, @NotNull @NotNull List<AreaLight> lights) Description copied from class:InstancedLightRenderer
Sets up the render state for drawing all lights.- Specified by:
setupRenderState
in classInstancedLightRenderer<AreaLight>
- Parameters:
lightRenderer
- The renderer instancelights
- All lights in the order they are in the instanced buffer
-
clearRenderState
protected void clearRenderState(@NotNull @NotNull LightRenderer lightRenderer, @NotNull @NotNull List<AreaLight> lights) Description copied from class:InstancedLightRenderer
Clears the render state after drawing all lights.- Specified by:
clearRenderState
in classInstancedLightRenderer<AreaLight>
- Parameters:
lightRenderer
- The renderer instancelights
- All lights in the order they are in the instanced buffer
-
isVisible
Description copied from class:InstancedLightRenderer
Checks whether the specified light can be seen in the specified frustum.- Specified by:
isVisible
in classInstancedLightRenderer<AreaLight>
- Parameters:
light
- The light to checkfrustum
- The frustum to check visibility with- Returns:
- Whether that light is visible
-