import Matrix from "../geom/Matrix"; import ColorTransform from "../geom/ColorTransform"; import Context3D from "../display3D/Context3D"; import Shader from "./Shader"; import DisplayObjectRenderer from "./DisplayObjectRenderer"; import BitmapData from "./BitmapData"; declare namespace openfl.display { /** * *BETA** * * The OpenGLRenderer API exposes support for OpenGL render instructions within the * `RenderEvent.RENDER_OPENGL` event. * */ export class OpenGLRenderer extends DisplayObjectRenderer { protected constructor(context: Context3D, defaultRenderTarget?: BitmapData); /** * The current OpenGL render context * */ gl: any; /** * Applies an alpha value to the active shader, if compatible with OpenFL core shaders * */ applyAlpha(alpha: number): void; /** * Binds a BitmapData object as the first active texture of the current active shader, * if compatible with OpenFL core shaders * */ applyBitmapData(bitmapData: BitmapData, smooth: boolean, repeat?: boolean): void; /** * Applies a color transform value to the active shader, if compatible with OpenFL * core shaders * */ applyColorTransform(colorTransform: ColorTransform): void; /** * Applies the "has color transform" uniform value for the active shader, if * compatible with OpenFL core shaders * */ applyHasColorTransform(enabled: boolean): void; /** * Applies render matrix to the active shader, if compatible with OpenFL core shaders * */ applyMatrix(matrix: Array): void; /** * Converts an OpenFL two-dimensional matrix to a compatible 3D matrix for use with * OpenGL rendering. Repeated calls to this method will return the same object with * new values, so it will need to be cloned if the result must be cached * */ getMatrix(transform: Matrix): any; /** * Sets the current active shader, which automatically unbinds the previous shader * if it was bound using an OpenFL Shader object * */ setShader(shader: Shader): void; /** * Updates the current OpenGL viewport using the current OpenFL stage coordinates * */ setViewport(): void; /** * Updates the current active shader with cached alpha, color transform, * bitmap data and other uniform or attribute values. This should be called in advance * of rendering * */ updateShader(): void; /** * Updates the active shader to expect an alpha array, if the current shader * is compatible with OpenFL core shaders * */ useAlphaArray(): void; /** * Updates the active shader to expect a color transform array, if the current shader * is compatible with OpenFL core shaders * */ useColorTransformArray(): void; } } export default openfl.display.OpenGLRenderer;