SpriteBatch#renderCalls, Group.setTransform()
| Modifier and Type | Field and Description |
|---|---|
| private final Affine2 | |
| private boolean | |
| private boolean | |
| private final Affine2 | |
| private final Matrix4 |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | CpuSpriteBatch(int size, ShaderProgram defaultShader)
Constructs a CpuSpriteBatch with a custom shader. |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| private static boolean | |
| private static boolean | |
| public void | draw(Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. |
| public void | draw(Texture texture, float x, float y, float width, float height, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. |
| public void | draw(Texture texture, float x, float y, int srcX, int srcY, int srcWidth, int srcHeight)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. |
| public void | draw(Texture texture, float x, float y, float width, float height, float u, float v, float u2, float v2)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. |
| public void | draw(Texture texture, float x, float y)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y having the width and height of the texture. |
| public void | draw(Texture texture, float x, float y, float width, float height)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height. |
| public void | draw(TextureRegion region, float x, float y)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y having the width and height of the region. |
| public void | draw(TextureRegion region, float x, float y, float width, float height)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height. |
| public void | draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
Overrides com. Implements com. Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height. |
| public void | draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise)
Overrides com. Implements com. Draws a rectangle with the texture coordinates rotated 90 degrees. |
| public void | draw(Texture texture, float[] spriteVertices, int offset, int count)
Overrides com. Implements com. Draws a rectangle using the given vertices. |
| public void | draw(TextureRegion region, float width, float height, Affine2 transform)
Overrides com. Implements com. Draws a rectangle transformed by the given matrix. |
| private void | drawAdjusted(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
|
| private void | drawAdjusted(Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)
|
| private void | drawAdjusted(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise)
|
| private void | |
| private void | |
| private void | drawAdjustedUV(Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, float u, float v, float u2, float v2, boolean flipX, boolean flipY)
|
| public void | |
| public Matrix4 | getTransformMatrix()
Overrides com. Implements com. Returns the current transform matrix. |
| public void | setTransformMatrix(Matrix4 transform)
Overrides com. Implements com. Sets the transform matrix to be used by this Batch. |
| public void |
| adjustAffine | back to summary |
|---|---|
| private final Affine2 adjustAffine | |
| adjustNeeded | back to summary |
|---|---|
| private boolean adjustNeeded | |
| haveIdentityRealMatrix | back to summary |
|---|---|
| private boolean haveIdentityRealMatrix | |
| tmpAffine | back to summary |
|---|---|
| private final Affine2 tmpAffine | |
| virtualMatrix | back to summary |
|---|---|
| private final Matrix4 virtualMatrix | |
| CpuSpriteBatch | back to summary |
|---|---|
| public CpuSpriteBatch() Constructs a CpuSpriteBatch with a size of 1000 and the default shader.
| |
| CpuSpriteBatch | back to summary |
|---|---|
| public CpuSpriteBatch(int size) Constructs a CpuSpriteBatch with the default shader.
| |
| CpuSpriteBatch | back to summary |
|---|---|
| public CpuSpriteBatch(int size, ShaderProgram defaultShader) Constructs a CpuSpriteBatch with a custom shader. | |
| checkEqual | back to summary |
|---|---|
| private static boolean checkEqual(Matrix4 a, Matrix4 b) | |
| checkEqual | back to summary |
|---|---|
| private static boolean checkEqual(Matrix4 matrix, Affine2 affine) | |
| checkIdt | back to summary |
|---|---|
| private static boolean checkIdt(Matrix4 matrix) | |
| draw | back to summary |
|---|---|
| public void draw(Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. The rectangle is offset
by originX, originY relative to the origin. Scale specifies the scaling factor by which the rectangle should be scaled
around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around originX,
originY. The portion of the
| |
| draw | back to summary |
|---|---|
| public void draw(Texture texture, float x, float y, float width, float height, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. The portion of the
| |
| draw | back to summary |
|---|---|
| public void draw(Texture texture, float x, float y, int srcX, int srcY, int srcWidth, int srcHeight) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. The portion of the
| |
| draw | back to summary |
|---|---|
| public void draw(Texture texture, float x, float y, float width, float height, float u, float v, float u2, float v2) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y having the given width and height in pixels. The portion of the
| |
| draw | back to summary |
|---|---|
| public void draw(Texture texture, float x, float y) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y having the width and height of the texture.
| |
| draw | back to summary |
|---|---|
| public void draw(Texture texture, float x, float y, float width, float height) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height.
| |
| draw | back to summary |
|---|---|
| public void draw(TextureRegion region, float x, float y) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y having the width and height of the region.
| |
| draw | back to summary |
|---|---|
| public void draw(TextureRegion region, float x, float y, float width, float height) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height.
| |
| draw | back to summary |
|---|---|
| public void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) Overrides com. Implements com. Doc from com. Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height. The rectangle is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the rectangle should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around originX, originY.
| |
| draw | back to summary |
|---|---|
| public void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise) Overrides com. Implements com. Doc from com. Draws a rectangle with the texture coordinates rotated 90 degrees. The bottom left corner at x,y and stretching the region to cover the given width and height. The rectangle is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the rectangle should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around originX, originY.
| |
| draw | back to summary |
|---|---|
| public void draw(Texture texture, float[] spriteVertices, int offset, int count) Overrides com. Implements com. Doc from com. Draws a rectangle using the given vertices. There must be 4 vertices, each made up of 5 elements in this order: x, y,
color, u, v. The
| |
| draw | back to summary |
|---|---|
| public void draw(TextureRegion region, float width, float height, Affine2 transform) Overrides com. Implements com. Doc from com. Draws a rectangle transformed by the given matrix.
| |
| drawAdjusted | back to summary |
|---|---|
| private void drawAdjusted(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) | |
| drawAdjusted | back to summary |
|---|---|
| private void drawAdjusted(Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY) | |
| drawAdjusted | back to summary |
|---|---|
| private void drawAdjusted(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, boolean clockwise) | |
| drawAdjusted | back to summary |
|---|---|
| private void drawAdjusted(TextureRegion region, float width, float height, Affine2 transform) | |
| drawAdjusted | back to summary |
|---|---|
| private void drawAdjusted(Texture texture, float[] spriteVertices, int offset, int count) | |
| drawAdjustedUV | back to summary |
|---|---|
| private void drawAdjustedUV(Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, float u, float v, float u2, float v2, boolean flipX, boolean flipY) | |
| flushAndSyncTransformMatrix | back to summary |
|---|---|
| public void flushAndSyncTransformMatrix()
Flushes the batch and realigns the real matrix on the GPU. Subsequent draws won't need adjustment and will be slightly
faster as long as the transform matrix is not Note The real transform matrix must be invertible. If a singular matrix is detected, GdxRuntimeException will be thrown.
| |
| getTransformMatrix | back to summary |
|---|---|
| public Matrix4 getTransformMatrix() Overrides com. Implements com. Doc from com. Returns the current transform matrix. Changing this within
| |
| setTransformMatrix | back to summary |
|---|---|
| public void setTransformMatrix(Matrix4 transform) Overrides com. Implements com. Sets the transform matrix to be used by this Batch. Even if this is called inside a
| |
| setTransformMatrix | back to summary |
|---|---|
| public void setTransformMatrix(Affine2 transform) Sets the transform matrix to be used by this Batch. Even if this is called inside a | |