1 | import { PRECISION } from '@pixi/constants';
|
2 | import type { GLProgram } from './GLProgram';
|
3 | export interface IAttributeData {
|
4 | type: string;
|
5 | size: number;
|
6 | location: number;
|
7 | name: string;
|
8 | }
|
9 | export interface IUniformData {
|
10 | index: number;
|
11 | type: string;
|
12 | size: number;
|
13 | isArray: boolean;
|
14 | value: any;
|
15 | name: string;
|
16 | }
|
17 | export interface IProgramExtraData {
|
18 | transformFeedbackVaryings?: {
|
19 | names: string[];
|
20 | bufferMode: 'separate' | 'interleaved';
|
21 | };
|
22 | }
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export declare class Program {
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | static defaultVertexPrecision: PRECISION;
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | static defaultFragmentPrecision: PRECISION;
|
43 | id: number;
|
44 |
|
45 | vertexSrc: string;
|
46 |
|
47 | fragmentSrc: string;
|
48 | nameCache: any;
|
49 | glPrograms: {
|
50 | [key: number]: GLProgram;
|
51 | };
|
52 | syncUniforms: any;
|
53 |
|
54 | attributeData: {
|
55 | [key: string]: IAttributeData;
|
56 | };
|
57 |
|
58 | uniformData: {
|
59 | [key: string]: IUniformData;
|
60 | };
|
61 | extra: IProgramExtraData;
|
62 | |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | constructor(vertexSrc?: string, fragmentSrc?: string, name?: string, extra?: IProgramExtraData);
|
69 | /**
|
70 | * The default vertex shader source.
|
71 | * @readonly
|
72 | */
|
73 | static get defaultVertexSrc(): string;
|
74 | /**
|
75 | * The default fragment shader source.
|
76 | * @readonly
|
77 | */
|
78 | static get defaultFragmentSrc(): string;
|
79 | /**
|
80 | * A short hand function to create a program based of a vertex and fragment shader.
|
81 | *
|
82 | * This method will also check to see if there is a cached program.
|
83 | * @param vertexSrc - The source of the vertex shader.
|
84 | * @param fragmentSrc - The source of the fragment shader.
|
85 | * @param name - Name for shader
|
86 | * @returns A shiny new PixiJS shader program!
|
87 | */
|
88 | static from(vertexSrc?: string, fragmentSrc?: string, name?: string): Program;
|
89 | }
|