-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy patharraybuffer.d.ts
30 lines (30 loc) · 971 Bytes
/
arraybuffer.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Program from './program';
import BaseBuffer from './basebuffer';
import { GLContext } from './types';
interface AttributeDef {
name: string;
type: GLenum;
size: number;
offset: number;
normalize: boolean;
stride: number;
}
declare class ArrayBuffer extends BaseBuffer {
readonly gl: GLContext;
readonly buffer: WebGLBuffer;
usage: GLenum;
stride: number;
byteLength: number;
length: number;
attribs: AttributeDef[];
constructor(gl: GLContext, data?: GLsizeiptr | BufferSource, usage?: GLenum, glbuffer?: WebGLBuffer);
bind(): void;
attrib(name: string, size: number, type: GLenum, normalize?: boolean): this;
data(array: BufferSource | GLsizeiptr): void;
subData(array: BufferSource, offset: number): void;
attribPointer(program: Program): void;
draw(mode: GLenum, count?: number, offset?: number): void;
dispose(): void;
_computeLength(): void;
}
export default ArrayBuffer;