Class VertexBuffer
Index
Constructors
Properties
Methods
Constructors
constructor
- new VertexBuffer(
context: Context,
array: StructArray,
attributes: readonly StructArrayMember[],
dynamicDraw?: boolean,
): VertexBufferParameters
- context: Context
- array: StructArray
- attributes: readonly StructArrayMember[]
OptionaldynamicDraw: boolean
Returns VertexBuffer
Properties
attributes
buffer
context
dynamicDraw
dynamicDraw: boolean
itemSize
itemSize: number
length
length: number
Methods
bind
Returns void
destroy
Destroy the GL buffer bound to the given WebGL context
Returns void
enableAttributes
Parameters
- gl: WebGLRenderingContext | WebGL2RenderingContext
- program: Program<any>
Returns void
setVertexAttribPointers
- setVertexAttribPointers(
gl: WebGLRenderingContext | WebGL2RenderingContext,
program: Program<any>,
vertexOffset?: number | null,
): voidSet the attribute pointers in a WebGL context
Parameters
- gl: WebGLRenderingContext | WebGL2RenderingContext
The WebGL context
- program: Program<any>
The active WebGL program
OptionalvertexOffset: number | nullIndex of the starting vertex of the segment
Returns void
- gl: WebGLRenderingContext | WebGL2RenderingContext
updateData
Parameters
- array: StructArray
Returns void
Was this helpful?
Whether this buffer will be repeatedly updated.