UNPKG

xgpu

Version:

XGPU is an extendable library for WebGPU that provides a higher-level, easy-to-use interface for building rendering engines or processing numeric data. It handles automatic data binding, buffer alignment, variable declarations in shaders, and more. XGPU i

44 lines (43 loc) 2.06 kB
/// <reference types="dist" /> import { Bindgroup } from "../shader/Bindgroup"; import { Bindgroups } from "../shader/Bindgroups"; import { FragmentShader } from "../shader/FragmentShader"; import { IShaderResource } from "../shader/resources/IShaderResource"; import { VertexBuffer } from "../shader/resources/VertexBuffer"; import { ShaderStruct } from "../shader/shaderParts/ShaderStruct"; import { VertexShader } from "../shader/VertexShader"; import { PrimitiveFloatUniform, PrimitiveIntUniform, PrimitiveUintUniform } from "../PrimitiveType"; import { EventDispatcher } from "../EventDispatcher"; export declare class Pipeline extends EventDispatcher { description: any; nbVertex: number; bindGroups: Bindgroups; vertexBuffers: VertexBuffer[]; vertexShader: VertexShader; fragmentShader: FragmentShader; protected vertexBufferLayouts: Iterable<GPUVertexBufferLayout>; protected gpuBindgroups: GPUBindGroup[]; protected gpuBindGroupLayouts: GPUBindGroupLayout[]; protected gpuPipelineLayout: GPUPipelineLayout; type: "compute" | "compute_mixed" | "render"; constructor(); get isComputePipeline(): boolean; get isRenderPipeline(): boolean; get isMixedPipeline(): boolean; protected _resources: any; get resources(): any; debug: string; clearAfterDeviceLostAndRebuild(): void; initFromObject(obj: any): void; pipelineCount: number; static getResourceDefinition(resources: any): any; addBindgroup(group: Bindgroup): void; protected createVertexBufferLayout(): any; protected createShaderInput(shader: VertexShader, buffers: VertexBuffer[]): ShaderStruct; protected createLayouts(): void; protected initPipelineResources(pipeline: Pipeline): void; protected build(): void; update(o?: any): void; getResourceName(resource: any): string; createPipelineInstanceArray(resources: (PrimitiveFloatUniform | PrimitiveIntUniform | PrimitiveUintUniform | IShaderResource)[], nbInstance: number): any[]; }