/** * A WebGL Batcher for rendering textured triangle meshes. * Uses indexed drawing to efficiently render arbitrary triangle geometry. * * Owns mesh-mode GL state ownership (since 19.7 / #1468): * * - {@link MeshBatcher#bind} enters mesh mode — enables `DEPTH_TEST` + * `LEQUAL` + `depthMask`, disables `BLEND`. * - {@link MeshBatcher#updatePassState} runs the one-shot * `clearDepth(1.0) + clear(DEPTH_BUFFER_BIT)` when the active target's * depth attachment is still dirty, immediately before a draw rather than * on entry — `bind()` fires on a batcher *transition*, not once a frame, * so a scene made only of meshes would otherwise never clear again after * its first frame. Subsequent draws against the same target rely on the * accumulated depth buffer. * - {@link MeshBatcher#unbind} exits mesh mode — restores non-mesh * defaults (`BLEND` on, `DEPTH_TEST` off, `depthMask` false) that the * 2D rendering paths assume. * - Subscribes to {@link event.RENDER_TARGET_CHANGED} (emitted by the * renderer at frame-start `clear()`, non-camera FBO bind, post-effect * FBO unbind) to re-arm the lazy depth clear whenever the active * framebuffer's attachments change identity. * * The WebGLRenderer doesn't know any of this — `setBatcher("mesh")` calls * `bind()` and the batcher sets up its own pass, refreshing whatever is * per-draw as it goes. Same lifecycle ports * cleanly to a future WebGPU renderer: `bind()` becomes "begin a * depth-enabled `RenderPassEncoder`", `unbind()` ends it. * @category Rendering */ export default class MeshBatcher extends MaterialBatcher { currentAlphaCutoff: any; currentEmissiveR: any; currentEmissiveG: any; currentEmissiveB: any; currentShininess: any; currentSpecularR: any; currentSpecularG: any; currentSpecularB: any; currentAlphaMapUnit: any; currentHasAlphaMap: any; currentEyeX: any; currentEyeY: any; currentEyeZ: any; currentFogMode: any; currentFogNear: any; currentFogInvRange: any; currentFogDensity: any; currentFogR: any; currentFogG: any; currentFogB: any; currentFogAxisX: any; currentFogAxisY: any; currentFogAxisZ: any; currentFogBase: any; retained: Map | undefined; instanced: Map | undefined; shaderVariants: Map | undefined; currentTintValue: any; trilinearTextures: WeakSet | undefined; anisotropicExt: any; maxAnisotropy: number | undefined; setPlacementUniforms(modelMatrix: any, tint: any, mesh: any): void; addMesh(mesh: any, tint: any): void; } import { MaterialBatcher } from "./material_batcher.js"; import RetainedGeometry from "../buffer/retained_geometry.js"; import { Matrix3d } from "../../../math/matrix3d.ts"; import GLShader from "../glshader.js"; //# sourceMappingURL=mesh_batcher.d.ts.map