Class RendererLauncher

java.lang.Object
nl.colorize.multimedialib.renderer.RendererLauncher

public final class RendererLauncher extends Object
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 Type
    Method
    Description
    configure(DisplayMode displayMode)
    Returns a launcher instance that will start the renderer using the specified display mode.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • forDesktop2D

      public Renderer 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.
      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

      public Renderer 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.
      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

      public Renderer 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.
      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

      public Renderer 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.
      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

      public Renderer forHeadless()
      Initializes and returns a headless renderer that can be used for testing and simulation purposes.
    • configure

      public static RendererLauncher configure(DisplayMode displayMode, WindowOptions windowOptions)
      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

      public static RendererLauncher configure(DisplayMode displayMode)
      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.