Package gaiasky.util
Class RenderUtils
java.lang.Object
gaiasky.util.RenderUtils
Contains common functions used by render systems.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidrenderBackbuffer(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 voidrenderKeepAspect(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 voidrenderKeepAspect(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.static voidrenderKeepAspect(com.badlogic.gdx.graphics.Texture tex, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g, com.badlogic.gdx.math.Vector2 lastSize) Renders the given texture to screen with a fill scaling, maintaining the aspect ratio.static voidrenderKeepAspect(TextureView tex, ExtSpriteBatch sb, com.badlogic.gdx.Graphics g, com.badlogic.gdx.math.Vector2 lastSize) Renders the given texture 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 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.
-
renderKeepAspect
public static void renderKeepAspect(com.badlogic.gdx.graphics.Texture tex, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.Graphics g, com.badlogic.gdx.math.Vector2 lastSize) Renders the given texture to screen with a fill scaling, maintaining the aspect ratio.- Parameters:
tex- The texture to render.sb- The sprite batch to use.g- The graphics instance.lastSize- The previous size, for recomputing the sprite batch transform.
-
renderKeepAspect
public static void renderKeepAspect(TextureView tex, ExtSpriteBatch sb, com.badlogic.gdx.Graphics g, com.badlogic.gdx.math.Vector2 lastSize) Renders the given texture to screen with a fill scaling, maintaining the aspect ratio.- Parameters:
tex- The texture to render.sb- The sprite batch to use.g- The graphics instance.lastSize- The previous size, for recomputing the sprite batch transform.
-