SpriteBatch

class SpriteBatch(val context: Context, val size: Int = 8191) : Batch

Draws batched quads using indices.

Author

Colton Daily

Parameters

context

the context

size

the max number of sprites in a single batch. Max of 8191.

Constructors

Link copied to clipboard
fun SpriteBatch(context: Context, size: Int = 8191)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun begin(projectionMatrix: Mat4?)
Link copied to clipboard
open override fun dispose()
Link copied to clipboard
open override fun draw(texture: Texture, spriteVertices: FloatArray, offset: Int, count: Int)
open fun draw(texture: Texture, x: Float, y: Float, originX: Float = 0.0f, originY: Float = 0.0f, width: Float = texture.width.toFloat(), height: Float = texture.height.toFloat(), scaleX: Float = 1.0f, scaleY: Float = 1.0f, rotation: Angle = Angle.ZERO, colorBits: Float = this.colorBits, flipX: Boolean = false, flipY: Boolean = false)
open override fun draw(slice: TextureSlice, x: Float, y: Float, originX: Float, originY: Float, width: Float, height: Float, scaleX: Float, scaleY: Float, rotation: Angle, colorBits: Float, flipX: Boolean, flipY: Boolean)
open override fun draw(texture: Texture, x: Float, y: Float, originX: Float, originY: Float, width: Float, height: Float, scaleX: Float, scaleY: Float, rotation: Angle, srcX: Int, srcY: Int, srcWidth: Int, srcHeight: Int, colorBits: Float, flipX: Boolean, flipY: Boolean)
open override fun draw(slice: TextureSlice, x: Float, y: Float, originX: Float, originY: Float, width: Float, height: Float, scaleX: Float, scaleY: Float, rotation: Angle, colorBits: Float, srcX: Int, srcY: Int, srcWidth: Int, srcHeight: Int, flipX: Boolean, flipY: Boolean)
Link copied to clipboard
open override fun end()
Link copied to clipboard
open override fun flush()
Link copied to clipboard
open override fun setBlendFunction(src: BlendFactor, dst: BlendFactor)
Link copied to clipboard
open override fun setBlendFunctionSeparate(srcFuncColor: BlendFactor, dstFuncColor: BlendFactor, srcFuncAlpha: BlendFactor, dstFuncAlpha: BlendFactor)
Link copied to clipboard
open override fun setToPreviousBlendFunction()
Link copied to clipboard
open override fun useDefaultShader()

Properties

Link copied to clipboard
open override var color: Color
Link copied to clipboard
open override var colorBits: Float
Link copied to clipboard
Link copied to clipboard
open override val drawing: Boolean
Link copied to clipboard
Link copied to clipboard
open override var projectionMatrix: Mat4
Link copied to clipboard
var renderCalls: Int = 0
Link copied to clipboard
open override var shader: ShaderProgram<*, *>
Link copied to clipboard
val size: Int = 8191
Link copied to clipboard
Link copied to clipboard
open override var transformMatrix: Mat4