import type { Game } from '../../core/game.js'; import type { Stage } from '../../core/stage.js'; import type { BaseTexture } from './base_texture.js'; import { Point } from '../../geom/point.js'; import { WebGLBlendModeManager } from './blend_manager.js'; import { WebGLFilterManager } from './filter_manager.js'; import { WebGLShaderManager } from './shader_manager.js'; import { WebGLSpriteBatch } from './sprite_batch.js'; import { WebGLStencilManager } from './stencil_manager.js'; import type { IdentifiedWebGLRenderingContext } from './util.js'; import type { RenderSession } from '../render_session.js'; import type { DisplayObject } from '../display_object.js'; export declare class WebGLRenderer { gl: IdentifiedWebGLRenderingContext; glContextId: number; type: number; resolution: number; autoResize: boolean; contextLost: boolean; clearBeforeRender: boolean; width: number; height: number; view: HTMLCanvasElement; _contextOptions: WebGLContextAttributes; projection: Point; offset: Point; shaderManager: WebGLShaderManager; spriteBatch: WebGLSpriteBatch; filterManager: WebGLFilterManager; stencilManager: WebGLStencilManager; blendModeManager: WebGLBlendModeManager; renderSession: RenderSession; /** * Creates a new WebGLRenderer instance. * @param {Game} game - The game instance. */ constructor(game: Game); /** * Destroys this renderer and cleans up resources. */ destroy(): void; /** * Initializes the WebGL registry. */ initRegistry(): void; /** * Initializes the WebGL context for rendering. * @param {Game} game - The game instance. * @throws {Error} */ initContext(game: Game): void; /** * Renders the stage to WebGL. * @param {Stage} stage - The root stage to render. */ render(stage: Stage): void; /** * Renders a display object to WebGL. * @param {DisplayObject} displayObject - The display object to render. * @param {Point} projection - The projection matrix. * @param {object} buffer - The render buffer. * @param {Matrix} matrix - The transformation matrix. */ renderDisplayObject(displayObject: DisplayObject, projection: Point, buffer?: WebGLFramebuffer | null): void; /** * Resizes the WebGL canvas to the specified dimensions. * @param {number} width - The new width of the canvas. * @param {number} height - The new height of the canvas. */ resize(width: number, height: number): void; /** * Updates a texture in the WebGL context. * @param {BaseTexture} texture - The base texture to update. * @returns {boolean} Whether the update was successful. */ updateTexture(texture: BaseTexture): boolean; /** * Maps blend modes to WebGL rendering operations. */ mapBlendModes(): void; } //# sourceMappingURL=renderer.d.ts.map