Esempio n. 1
0
 /**
  * Renders the {@link JumboGraphicsObject} parameter using the current {@link JumboRenderModule}.
  *
  * @param e GraphicsObject to be rendered
  * @see #render(JumboGraphicsObject e, JumboRenderModule m)
  * @see #setCurrentRenderMode(int index)
  */
 public static void render(JumboGraphicsObject e) {
   try {
     current.render(e, renderwidth, renderheight);
   } catch (NullPointerException ex) {
     JumboErrorHandler.handle(ex, "A parameter in the entity " + e + " is null!");
   } catch (Exception exc) {
     JumboErrorHandler.handle(exc, "Error rendering " + exc);
   }
 }
Esempio n. 2
0
 /**
  * Renders the {@link JumboGraphicsObject} parameter using the specified {@link
  * JumboRenderModule}, calling its initiation action, preparation action, and finally the render
  * action. Afterwards, reverts everything to the default render mode.
  *
  * <p>This method is slower than the standard {@link #render(JumboGraphicsObject e)}, as it has to
  * switch render modes twice.
  *
  * @param e GraphicsObject to be rendered
  * @param m the JumboRenderMode to use for rendering
  * @see #render(JumboGraphicsObject e)
  */
 public static void render(JumboGraphicsObject e, JumboRenderModule m) {
   try {
     m.init();
     m.prepare();
     m.render(e, renderwidth, renderheight);
     current.init();
     current.prepare();
   } catch (NullPointerException ex) {
     JumboErrorHandler.handle(ex, "A parameter in the entity " + e + " is null!");
   } catch (Exception exc) {
     JumboErrorHandler.handle(exc, "Error rendering " + exc);
   }
 }