import { Context } from './context'; import { Geometry } from './geometry'; /** * Geometry for a viewport/screen-filling rectangle. The geometry creates rectangle vertices, associated to * a vertex array object (from geometry base class), and provides a specialized draw call for rendering. It is intended * for, e.g., viewport/screen-filling rendering in post-processing. The vertices can be used directly as normalized * device space (NDC) coordinates, e.g., by using the following vertex shader snippet: * * ``` * #if __VERSION__ == 100 * attribute vec2 a_vertex; * #else * layout(location = 0) in vec2 a_vertex; * #endif * * ... * * v_uv = a_vertex * 0.5 + 0.5; * gl_Position = vec4(a_vertex, 0.0, 1.0); * ``` */ export declare class NdcFillingRectangle extends Geometry { /** * 2 ───── 3 * │ \ │ * │ \ │ * 0 ───── 1 */ protected static readonly VERTICES: Float32Array; /** @see {@link vertexLocation} */ protected _vertexLocation: GLuint; /** * Object constructor, requires a context and an identifier. * @param context - Valid context to create the object for. * @param identifier - Meaningful name for identification of this instance. */ constructor(context: Context, identifier?: string); /** * Binds all vertex buffer objects (VBOs) to pre-set attribute binding points. * @param indices - Unused, since pre-set locations are used. */ protected bindBuffers(): void; /** * Unbinds all vertex buffer objects (VBOs) and disables their attribute binding points. * @param indices - Unused, since pre-set locations are used. */ protected unbindBuffers(): void; /** * Creates the vertex buffer object (VBO) and creates and initializes the buffer's data store. * @param vertexLocation - Attribute binding point for vertices. */ initialize(vertexLocation?: GLuint): boolean; /** * Specifies/invokes the draw of this screen-aligned triangle. */ draw(): void; /** * Attribute location to which this geometry's vertices are bound to. */ get vertexLocation(): GLint; }