Class RendererLauncher
java.lang.Object
nl.colorize.multimedialib.renderer.RendererLauncher
Helper class that can be used to create and initialize
Renderer
instances. Using this class also makes it easier for applications to
support different renderers depending on the platform.-
Method Summary
Modifier and TypeMethodDescriptionstatic RendererLauncher
configure
(DisplayMode displayMode) Returns a launcher instance that will start the renderer using the specified display mode.static RendererLauncher
configure
(DisplayMode displayMode, WindowOptions windowOptions) Returns a launcher instance that will start the renderer using the specified display mode and window options.forBrowser2D
(String requestedRendererName) Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on web and mobile platforms in 2D graphics mode.forBrowser3D
(String requestedRendererName) Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on web and mobile platforms in 3D graphics mode.forDesktop2D
(String requestedRendererName) Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on desktop platforms in 2D graphics mode.forDesktop3D
(String requestedRendererName) Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on desktop platforms in 3D graphics mode.Initializes and returns a headless renderer that can be used for testing and simulation purposes.
-
Method Details
-
forDesktop2D
Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on desktop platforms in 2D graphics mode.- Throws:
UnsupportedOperationException
- if the renderer with the requested name does not exist, or if that renderer does not support the requested graphics mode and/or platforms.IllegalStateException
- if this launcher has not configured any window options.
-
forDesktop3D
Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on desktop platforms in 3D graphics mode.- Throws:
UnsupportedOperationException
- if the renderer with the requested name does not exist, or if that renderer does not support the requested graphics mode and/or platforms.IllegalStateException
- if this launcher has not configured any window options.
-
forBrowser2D
Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on web and mobile platforms in 2D graphics mode.- Throws:
UnsupportedOperationException
- if the renderer with the requested name does not exist, or if that renderer does not support the requested graphics mode and/or platforms.
-
forBrowser3D
Initializes and returns the renderer with the specified name, configuring the renderer so that it can be used on web and mobile platforms in 3D graphics mode.- Throws:
UnsupportedOperationException
- if the renderer with the requested name does not exist, or if that renderer does not support the requested graphics mode and/or platforms.
-
forHeadless
Initializes and returns a headless renderer that can be used for testing and simulation purposes. -
configure
Returns a launcher instance that will start the renderer using the specified display mode and window options. Note the window options will only be used on desktop platforms. -
configure
Returns a launcher instance that will start the renderer using the specified display mode. The launcher configuration will not include window options, meaning this launcher cannot be used on desktop platforms.
-