/** * additional import for TypeScript * @import {TextureAtlas} from "./../../texture/atlas.js"; */ export const V_ARRAY: Vector3d[]; /** * A WebGL Compositor object. This class handles all of the WebGL state
* Pushes texture regions or shape geometry into WebGL buffers, automatically flushes to GPU * @category Rendering */ export default class QuadBatcher extends MaterialBatcher { /** * Initialize the compositor * @ignore */ init(renderer: any): void; /** * the maximum number of texture units used for multi-texture batching * @type {number} * @ignore */ maxBatchTextures: number | undefined; /** * whether multi-texture batching is currently active * (disabled when a custom ShaderEffect is applied) * @type {boolean} * @ignore */ useMultiTexture: boolean | undefined; /** * (Re-)create the index buffer for quad batching (4 verts + 6 indices per quad). * Called from `init` and `reset` (after context loss). * @ignore */ createIndexBuffer(): void; /** * Bind the color sampler uniforms (`uSampler0..uSamplerN-1`) to their * respective texture units. Called from `init` and `reset`. * @ignore */ bindColorSamplers(): void; /** * Select the shader to use for compositing. * Multi-texture batching is automatically enabled when the default * shader is active, and disabled for custom ShaderEffect shaders. * @see GLShader * @see ShaderEffect * @param {GLShader|ShaderEffect} shader - a reference to a GLShader or ShaderEffect instance */ useShader(shader: GLShader | ShaderEffect): void; /** * Draw a screen-aligned quad with the given raw WebGL texture through the given shader. * Binds the texture to unit 0, pushes 4 vertices (Y-flipped UVs), flushes, * then unbinds the texture. * @param {WebGLTexture} source - the raw GL texture to blit * @param {number} x - destination x * @param {number} y - destination y * @param {number} width - destination width * @param {number} height - destination height * @param {GLShader|ShaderEffect} shader - the shader effect to apply */ blitTexture(source: WebGLTexture, x: number, y: number, width: number, height: number, shader: GLShader | ShaderEffect): void; /** * Add a textured quad * @param {TextureAtlas} texture - Source texture atlas * @param {number} x - Destination x-coordinate * @param {number} y - Destination y-coordinate * @param {number} w - Destination width * @param {number} h - Destination height * @param {number} u0 - Texture UV (u0) value. * @param {number} v0 - Texture UV (v0) value. * @param {number} u1 - Texture UV (u1) value. * @param {number} v1 - Texture UV (v1) value. * @param {number} tint - tint color to be applied to the texture in UINT32 (argb) format * @param {boolean} [reupload=false] - Force the texture to be reuploaded even if already bound */ addQuad(texture: TextureAtlas, x: number, y: number, w: number, h: number, u0: number, v0: number, u1: number, v1: number, tint: number, reupload?: boolean): void; } import { Vector3d } from "../../../math/vector3d.ts"; import { MaterialBatcher } from "./material_batcher.js"; import type { TextureAtlas } from "./../../texture/atlas.js"; //# sourceMappingURL=quad_batcher.d.ts.map