/** * An object that renders a quad using a {@link Shader}. * * Example: * * ```javascript * const shader = pc.createShaderFromCode(app.graphicsDevice, vertexShader, fragmentShader, `MyShader`); * const quad = new QuadRender(shader); * quad.render(); * quad.destroy(); * ``` * * @category Graphics */ export class QuadRender { /** * Create a new QuadRender instance. * * @param {import('../../platform/graphics/shader.js').Shader} shader - The shader to be used to render the quad. */ constructor(shader: import("../../platform/graphics/shader.js").Shader); /** * @type {UniformBuffer} * @ignore */ uniformBuffer: UniformBuffer; /** * @type {BindGroup} * @ignore */ bindGroup: BindGroup; shader: import("../../platform/graphics/shader.js").Shader; /** * Destroys the resources associated with this instance. */ destroy(): void; /** * Renders the quad. If the viewport is provided, the original viewport and scissor is restored * after the rendering. * * @param {import('../../core/math/vec4.js').Vec4} [viewport] - The viewport rectangle of the * quad, in pixels. The viewport is not changed if not provided. * @param {import('../../core/math/vec4.js').Vec4} [scissor] - The scissor rectangle of the * quad, in pixels. Used only if the viewport is provided. */ render(viewport?: import("../../core/math/vec4.js").Vec4, scissor?: import("../../core/math/vec4.js").Vec4): void; } import { UniformBuffer } from '../../platform/graphics/uniform-buffer.js'; import { BindGroup } from '../../platform/graphics/bind-group.js';