Package gaiasky.util

Class RenderUtils

java.lang.Object
gaiasky.util.RenderUtils

public class RenderUtils
extends java.lang.Object
Contains utilities to render stuff
  • Constructor Summary

    Constructors
    Constructor Description
    RenderUtils()  
  • Method Summary

    Modifier and Type Method Description
    static void renderBackbuffer​(com.badlogic.gdx.graphics.glutils.FrameBuffer fb, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g)
    Assumes the aspect ratio is fine
    static void renderKeepAspect​(com.badlogic.gdx.graphics.glutils.FrameBuffer fb, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g)
    Renders the given frame buffer to screen with a fill scaling, maintaining the aspect ratio
    static void renderKeepAspect​(com.badlogic.gdx.graphics.glutils.FrameBuffer fb, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g, com.badlogic.gdx.math.Vector2 lastSize)
    Renders the given frame buffer to screen with a fill scaling, maintaining the aspect ratio

    Methods inherited from class java.lang.Object

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

    • RenderUtils

      public RenderUtils()
  • Method Details

    • renderBackbuffer

      public static void renderBackbuffer​(com.badlogic.gdx.graphics.glutils.FrameBuffer fb, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g)
      Assumes the aspect ratio is fine
      Parameters:
      fb - The frame buffer to render
      sb - The sprite batch to use
      g - The graphics instance
    • renderKeepAspect

      public static void renderKeepAspect​(com.badlogic.gdx.graphics.glutils.FrameBuffer fb, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g)
      Renders the given frame buffer to screen with a fill scaling, maintaining the aspect ratio
      Parameters:
      fb - The frame buffer to render
      sb - The sprite batch to use
      g - The graphics instance
    • renderKeepAspect

      public static void renderKeepAspect​(com.badlogic.gdx.graphics.glutils.FrameBuffer fb, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g, com.badlogic.gdx.math.Vector2 lastSize)
      Renders the given frame buffer to screen with a fill scaling, maintaining the aspect ratio
      Parameters:
      fb - The frame buffer to render
      sb - The sprite batch to use
      g - The graphics instance
      lastSize - The previous size, for recomputing the sprite batch transform