TextureArraySpriteBatch
class TextureArraySpriteBatch(val context: Context, val size: Int = 1000, maxTextureSlots: Int, maxTextureWidth: Int, maxTextureHeight: Int, textureArrayMagFilter: TexMagFilter = TexMagFilter.NEAREST, textureArrayMinFilter: TexMinFilter = TexMinFilter.NEAREST) : Batch
Requires GLES 3.0!
Creates a new TextureArraySpriteBatch that is an optimized version of the SpriteBatch that maintains a texture-cache inside a GL.TEXTURE_2D_ARRAY to combine draw calls with different textures effectively.
Author
Colton Daily
Parameters
context
the context
size
the max number of sprites in a single batch. Max of 8191.
maxTextureSlots
the expected number of textures to be in use.
maxTextureWidth
the width of the largest texture
maxTextureHeight
the height of the largest texture
textureArrayMagFilter
the mag filter to use for the texture array
textureArrayMinFilter
the min filter to use for the texture array
Constructors
Link copied to clipboard
fun TextureArraySpriteBatch(context: Context, size: Int = 1000, maxTextureSlots: Int, maxTextureWidth: Int, maxTextureHeight: Int, textureArrayMagFilter: TexMagFilter = TexMagFilter.NEAREST, textureArrayMinFilter: TexMinFilter = TexMinFilter.NEAREST)
Types
Functions
Link copied to clipboard
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)
Link copied to clipboard
Link copied to clipboard
open override fun setBlendFunctionSeparate(srcFuncColor: BlendFactor, dstFuncColor: BlendFactor, srcFuncAlpha: BlendFactor, dstFuncAlpha: BlendFactor)
Link copied to clipboard
Link copied to clipboard