import type { NumberArray } from '@luma.gl/api'; import { ResourceProps } from '@luma.gl/api'; import Program from './program'; import { WEBGLVertexArrayObject } from '@luma.gl/webgl'; import Buffer from './buffer'; /** * VertexArrayObject properties * @param constantAttributeZero Attribute 0 can not be disable on most desktop OpenGL based browsers * and on iOS Safari browser. */ export declare type VertexArrayObjectProps = ResourceProps & { constantAttributeZero?: boolean; program?: Program; isDefaultArray?: boolean; }; /** @deprecated Use RenderPipeline (public) and WEBGLVertexArrayObject (internal) */ export default class VertexArrayObject extends WEBGLVertexArrayObject { get [Symbol.toStringTag](): string; private static MAX_ATTRIBUTES; static isSupported(gl: WebGLRenderingContext | WebGL2RenderingContext, options?: VertexArrayObjectProps): boolean; /** * Returns the global (null) vertex array object. Exists even when no extension available. * @todo (Tarek): VAOs are now polyfilled. Deprecate this in 9.0 */ static getDefaultArray(gl: WebGLRenderingContext): VertexArrayObject; /** Get maximum number of attributes in a vertex array */ static getMaxAttributes(gl: WebGLRenderingContext): number; /** * Set an attribute to a constant value * @param gl * @param location * @param array * * @note Constants are stored globally on the WebGL context, not the VAO * so they need to be updated before every render * @todo - use known type (in configuration or passed in) to allow non-typed arrays? * @todo - remember/cache values to avoid setting them unnecessarily? */ static setConstant(gl: WebGLRenderingContext, location: any, array: any): void; private buffer; private bufferValue; constructor(gl: WebGLRenderingContext, props?: VertexArrayObjectProps); delete(): this; get MAX_ATTRIBUTES(): number; /** * Provide a means to create a buffer that is equivalent to a constant. * NOTE: Desktop OpenGL cannot disable attribute 0. * https://stackoverflow.com/questions/20305231/webgl-warning-attribute-0-is-disabled- * this-has-significant-performance-penalty */ getConstantBuffer(elementCount: number, value: any): Buffer; /** @deprecated this function has no effect */ initialize(props?: VertexArrayObjectProps): this; /** @deprecated this function is not implemented */ setProps(props: VertexArrayObjectProps): this; _normalizeConstantArrayValue(arrayValue: NumberArray): import("@luma.gl/api").TypedArray; _compareConstantArrayValues(v1: NumberArray, v2: NumberArray): boolean; static _setConstantFloatArray(gl: WebGLRenderingContext, location: number, array: NumberArray): void; static _setConstantIntArray(gl: WebGL2RenderingContext, location: number, array: NumberArray): void; static _setConstantUintArray(gl: WebGL2RenderingContext, location: number, array: NumberArray): void; _getParameter(pname: number, options: { location: number; }): any; } //# sourceMappingURL=vertex-array-object.d.ts.map