import { IVec3, Mat4 } from '@gglib/math'; import { Device } from './Device'; import { PrimitiveType } from './enums'; import { ShaderProgram } from './resources'; import { BlendStateParams, CullStateParams, DepthStateParams, ScissorStateParams, StencilStateParams, ViewportStateParams } from './states'; /** * Constructor options for {@link SpriteBatch} * * @public */ export interface PrimitiveBatchOptions { /** * The maximum number of vertices this batch should handle in one draw call */ batchSize?: number; /** * A custom shader that should be used for rendering the sprites */ program?: ShaderProgram; /** * The primitive type to draw with this batch */ primitiveType?: PrimitiveType; } /** * Options for {@link SpriteBatch.begin} * * @public */ export interface PrimitiveBatchBeginOptions { /** * 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; /** * The primitive type to draw with this batch */ primitiveType?: PrimitiveType; } export declare class PrimitiveBatch { private device; private hasBegun; private arrayBuffer; private vertexPositionView; private vertexColorView; private vertexBuffer; private mainProgram; private mainMatrix; private program; private matrix; private blendState; private cullState; private depthState; private stencilState; private scissorState; private viewportState; private batchSize; private primitiveType; private verticesPerPrimitive; private vertexIndex; private vertexCount; constructor(device: Device, options?: PrimitiveBatchOptions); begin(options?: PrimitiveBatchBeginOptions): void; addVertex(position: IVec3, color: number): void; end(): void; private drawBatch; } //# sourceMappingURL=PrimitiveBatch.d.ts.map