Package arc.graphics.g2d
Class SortedSpriteBatch
java.lang.Object
arc.graphics.g2d.Batch
arc.graphics.g2d.SpriteBatch
arc.graphics.g2d.SortedSpriteBatch
- All Implemented Interfaces:
Disposable
- Direct Known Subclasses:
QueueBatch
Fast sorting implementation written by zxtej. Don't ask me how it works.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected int
protected arc.graphics.g2d.DrawRequest[]
protected float[]
protected boolean
Fields inherited from class arc.graphics.g2d.SpriteBatch
SPRITE_SIZE, VERTEX_SIZE, vertices
Fields inherited from class arc.graphics.g2d.Batch
apply, blending, color, colorPacked, combinedMatrix, customShader, idx, lastTexture, mesh, mixColor, mixColorPacked, ownsShader, projectionMatrix, shader, sortAscending, transformMatrix, z
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
draw
(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float rotation) protected void
protected void
protected void
protected void
flush()
protected void
protected void
setBlending
(Blending blending) protected void
protected void
setSort
(boolean sort) Enables or disables Z-sorting.protected void
protected void
protected void
Methods inherited from class arc.graphics.g2d.SpriteBatch
createShader
Methods inherited from class arc.graphics.g2d.Batch
dispose, getBlending, getColor, getMixColor, getPackedColor, getPackedMixColor, getProjection, getShader, getTransform, setColor, setColor, setMixColor, setMixColor, setPackedColor, setPackedMixColor, setProjection, setShader, setSortAscending, setTransform, setupMatrices, switchTexture, z
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface arc.util.Disposable
isDisposed
-
Field Details
-
requests
protected arc.graphics.g2d.DrawRequest[] requests -
sort
protected boolean sort -
flushing
protected boolean flushing -
requestZ
protected float[] requestZ -
numRequests
protected int numRequests
-
-
Constructor Details
-
SortedSpriteBatch
public SortedSpriteBatch()
-
-
Method Details
-
setSort
protected void setSort(boolean sort) Description copied from class:Batch
Enables or disables Z-sorting. Flushes the batch. Only does something on supported batches. -
setShader
-
setBlending
- Overrides:
setBlending
in classBatch
-
draw
- Overrides:
draw
in classSpriteBatch
-
draw
protected void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float rotation) - Overrides:
draw
in classSpriteBatch
-
draw
-
expandRequests
protected void expandRequests() -
flush
protected void flush()- Overrides:
flush
in classSpriteBatch
-
flushRequests
protected void flushRequests() -
sortRequests
protected void sortRequests() -
sortRequestsThreaded
protected void sortRequestsThreaded() -
sortRequestsStandard
protected void sortRequestsStandard()
-