public class DelayedSpriteBatch extends Object
Wrapper over libgdx's included SpriteBatch which doesn't manipulate _any_ OpenGL
state until the call to SpriteBatch.end(). This allows a begin/end block to
wrap over a large amount of code that might manipulate OpenGL state one or more times.
Sprites rendered with this are simply queued up until the end() call and rendered in that
same order with SpriteBatch.
This "delayed" queueing behaviour will not necessarily be desirable behaviour-wise /
performance-wise in all situations. This class introduces a small bit of performance overhead
compared to using SpriteBatch directly.
| Constructor and Description |
|---|
DelayedSpriteBatch() |
| Modifier and Type | Method and Description |
|---|---|
void |
begin(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch) |
void |
begin(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch,
com.badlogic.gdx.graphics.Camera perspectiveCamera,
int pixelScale) |
void |
draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
CharSequence str) |
void |
draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
CharSequence str,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float scale,
CharSequence str) |
void |
draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float scale,
CharSequence str,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float z,
float scale,
CharSequence str) |
void |
draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float z,
float scale,
CharSequence str,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
float u,
float v,
float u2,
float v2) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
float u,
float v,
float u2,
float v2,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
float u,
float v,
float u2,
float v2) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
float u,
float v,
float u2,
float v2,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
int srcX,
int srcY,
int srcWidth,
int srcHeight) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
int srcX,
int srcY,
int srcWidth,
int srcHeight) |
void |
draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float width,
float height) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float width,
float height,
com.badlogic.gdx.graphics.Color tint) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z,
float width,
float height) |
void |
draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z,
float width,
float height,
com.badlogic.gdx.graphics.Color tint) |
void |
end() |
void |
flush() |
public void begin(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch)
public void begin(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch,
com.badlogic.gdx.graphics.Camera perspectiveCamera,
int pixelScale)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
float u,
float v,
float u2,
float v2)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
float u,
float v,
float u2,
float v2,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
float u,
float v,
float u2,
float v2)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
float u,
float v,
float u2,
float v2,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
int srcX,
int srcY,
int srcWidth,
int srcHeight)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
int srcX,
int srcY,
int srcWidth,
int srcHeight)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight)
public void draw(com.badlogic.gdx.graphics.Texture texture,
float x,
float y,
float z,
float width,
float height,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float width,
float height)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float width,
float height,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z,
float width,
float height)
public void draw(com.badlogic.gdx.graphics.g2d.TextureRegion region,
float x,
float y,
float z,
float width,
float height,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
CharSequence str)
public void draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
CharSequence str,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float scale,
CharSequence str)
public void draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float scale,
CharSequence str,
com.badlogic.gdx.graphics.Color tint)
public void draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float z,
float scale,
CharSequence str)
public void draw(com.badlogic.gdx.graphics.g2d.BitmapFont font,
float x,
float y,
float z,
float scale,
CharSequence str,
com.badlogic.gdx.graphics.Color tint)
public void flush()
public void end()
Copyright © 2022. All rights reserved.