Package gaiasky.util
Class RenderUtils
java.lang.Object
gaiasky.util.RenderUtils
Contains utilities to render stuff
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 finestatic 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 ratiostatic 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
-
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 rendersb
- The sprite batch to useg
- 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 rendersb
- The sprite batch to useg
- 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 rendersb
- The sprite batch to useg
- The graphics instancelastSize
- The previous size, for recomputing the sprite batch transform
-