Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Batcher

Batcher

A reusable memory buffer for batched rendering, designed for maximum throughput. Access via the 'renderer' submodule.

Constructor

  • Batcher() → BatcherBatcher() → Batcher

A reusable memory buffer for batched rendering, designed for maximum throughput.

Methods


Preallocate

preallocate(n_sprites: int) → Nonepreallocate(n_sprites: int) → None

Preallocate internal buffers for a specific number of sprites. This prevents runtime allocations when drawing large batches.

Args

  • n_sprites : The number of sprites to preallocate capacity for.

Free

free() → Nonefree() → None

Free the allocated internal memory.

PreviousAudio
NextBody

On this page

ConstructorMethodsPreallocateFree