FlixelBatch
View sourceinterface
org.flixelgdx.graphics.FlixelBatch
Extension of the libGDX Batch interface that adds render-call tracking.
All FlixelGDX batch implementations must satisfy this interface so the debug overlay can aggregate render-call counts across the framework's own batch and any additional user-registered batches without depending on a concrete class such as libGDX's SpriteBatch.
FlixelBatch.getRenderCalls() reports how many glDrawElements calls the batch issued since the most recent FlixelBatch.begin(), mirroring SpriteBatch.renderCalls. FlixelBatch.getTotalRenderCalls() is the cumulative count since the batch was constructed, mirroring SpriteBatch.totalRenderCalls. Both values are used by FlixelDebugManager and FlixelDebugOverlay to display stats in the debug panel.
The built-in implementation is FlixelSpriteBatch. Custom implementations that wrap a third-party renderer only need to forward these two values from whatever the underlying renderer tracks.
Methods
getRenderCalls()
Returns the number of draw calls (glDrawElements invocations) issued by this batch since the last FlixelBatch.begin() call. This counter resets to zero at the start of each frame when FlixelBatch.begin() is invoked.
Returns: Per-frame render call count.
getTotalRenderCalls()
Returns the cumulative number of draw calls issued by this batch since it was created. Unlike FlixelBatch.getRenderCalls(), this value never resets.
Returns: Total render call count since construction.