Class DirectionalLightRenderer
java.lang.Object
foundry.veil.impl.client.render.light.DirectionalLightRenderer
- All Implemented Interfaces:
LightTypeRenderer<DirectionalLightData>,AutoCloseable,org.lwjgl.system.NativeResource
@Internal
public class DirectionalLightRenderer
extends Object
implements LightTypeRenderer<DirectionalLightData>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLight(DirectionalLightData light) Adds the specified light to the renderer.voidfree()Collection<? extends LightRenderHandle<DirectionalLightData>> intvoidprepareLights(LightRenderer lightRenderer, CullFrustum frustum) Prepares the light renderer.voidrenderLights(LightRenderer lightRenderer) Renders all prepared lights with this renderer.steal(LightRenderHandle<DirectionalLightData> handle) Attempts to re-add the specified handle to this renderer if invalid.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
DirectionalLightRenderer
public DirectionalLightRenderer()
-
-
Method Details
-
addLight
Description copied from interface:LightTypeRendererAdds the specified light to the renderer.- Specified by:
addLightin interfaceLightTypeRenderer<DirectionalLightData>- Parameters:
light- The light to add- Returns:
- A handle to the light in the renderer
-
steal
public LightRenderHandle<DirectionalLightData> steal(LightRenderHandle<DirectionalLightData> handle) Description copied from interface:LightTypeRendererAttempts to re-add the specified handle to this renderer if invalid.- Specified by:
stealin interfaceLightTypeRenderer<DirectionalLightData>- Parameters:
handle- The handle to add- Returns:
- A valid handle to this renderer
-
prepareLights
Description copied from interface:LightTypeRendererPrepares the light renderer.- Specified by:
prepareLightsin interfaceLightTypeRenderer<DirectionalLightData>- Parameters:
lightRenderer- The light renderer instancefrustum- The culling view frustum
-
renderLights
Description copied from interface:LightTypeRendererRenders all prepared lights with this renderer.
Shaders, custom uniforms, and the way lights are rendered is up to the individual renderer.- Specified by:
renderLightsin interfaceLightTypeRenderer<DirectionalLightData>- Parameters:
lightRenderer- The light renderer instance
-
getLights
- Specified by:
getLightsin interfaceLightTypeRenderer<DirectionalLightData>- Returns:
- A view of all lights in this renderer
-
getVisibleLights
public int getVisibleLights()- Specified by:
getVisibleLightsin interfaceLightTypeRenderer<DirectionalLightData>- Returns:
- The number of lights visible last frame
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-