import { Mat4 } from '@gglib/math'; import { Device } from './Device'; import { ShaderProgram } from './resources/ShaderProgram'; import { Texture } from './resources/Texture'; import { Sprite } from './Sprite'; import { BlendStateParams } from './states/BlendState'; import { CullStateParams } from './states/CullState'; import { DepthStateParams } from './states/DepthState'; import { ScissorStateParams } from './states/ScissorState'; import { StencilStateParams } from './states/StencilState'; import { ViewportStateParams } from './states/ViewportState'; /** * Constructor options for {@link SpriteBatch} * * @public */ export interface SpriteBatchOptions { /** * The maximum number of sprites this batch should handle in one draw call */ batchSize?: number; /** * A custom shader that should be used for rendering the sprites */ program?: ShaderProgram; } /** * Options for {@link SpriteBatch.begin} * * @public */ export interface SpriteBatchBeginOptions { sortMode?: any; /** * The blend state */ blendState?: BlendStateParams; /** * The cull state */ cullState?: CullStateParams; /** * The depth state */ depthState?: DepthStateParams; /** * The stencil state */ stencilState?: StencilStateParams; /** * The scissor state */ scissorState?: ScissorStateParams; /** * The viewport state */ viewportState?: ViewportStateParams; /** * The viewProjection matrix to use for rendering */ viewProjection?: Mat4; /** * A custom shader that should be used for rendering the sprites */ program?: ShaderProgram; } /** * @public */ export declare class SpriteBatch { private device; private hasBegun; private spriteQueue; private arrayBuffer; private vertexPositionView; private vertexTextureView; private vertexColorView; private vertexBuffer; private indexBuffer; private mainProgram; private mainMatrix; private program; private matrix; private blendState; private cullState; private depthState; private stencilState; private scissorState; private viewportState; private sortMode; private batchSize; private spritePool; constructor(device: Device, options?: SpriteBatchOptions); begin(options?: SpriteBatchBeginOptions): void; /** * @param texture - The texture to draw */ draw(texture: Texture): Sprite; end(): void; private commitRenderState; private drawBatch; private drawSlice; } //# sourceMappingURL=SpriteBatch.d.ts.map