Package org.collebol
Class RenderRegisterHandler
java.lang.Object
org.collebol.RenderRegisterHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the CameraRenderer.getTextRenderer(String name) Retrieves a TextRenderer by its name.getTextureRenderer(String name) Retrieves a TextureRenderer by its name.<T extends Renderer>
voidregisterNewRenderer(T renderer) Registers a new renderer.voidregisterTextureRenderer(TextureRenderer renderer)
-
Constructor Details
-
RenderRegisterHandler
-
-
Method Details
-
registerNewRenderer
Registers a new renderer. Depending on the type of the renderer, it adds it to the appropriate map or sets it as the camera renderer.- Parameters:
renderer- The renderer to be registered.
-
registerTextureRenderer
-
getTextRenderer
Retrieves a TextRenderer by its name. Throws an exception if no TextRenderer is registered or if the specified name is not found.- Parameters:
name- The name of the TextRenderer to retrieve.- Returns:
- The TextRenderer associated with the given name.
- Throws:
RuntimeException- if no TextRenderer is registered or if the specified name is not found.
-
getTextureRenderer
Retrieves a TextureRenderer by its name. Throws an exception if no TextureRenderer is registered or if the specified name is not found.- Parameters:
name- The name of the TextureRenderer to retrieve.- Returns:
- The TextureRenderer associated with the given name.
- Throws:
RuntimeException- if no TextureRenderer is registered or if the specified name is not found.
-
getCameraRenderer
Retrieves the CameraRenderer. Throws an exception if no CameraRenderer is registered.- Returns:
- The CameraRenderer.
- Throws:
RuntimeException- if no CameraRenderer is registered.
-