Class: VertexArrayObject

VertexArrayObject

new PIXI.glCore.VertexArrayObject(gl)

Helper class to work with WebGL VertexArrayObjects (vaos)
Only works if WebGL extensions are enabled (they usually are)

Name Type Description
gl WebGLRenderingContext

The current WebGL rendering context

Members

staticPIXI.glCore.VertexArrayObject.FORCE_NATIVE

Lets the VAO know if you should use the WebGL extension or the native methods.
Some devices behave a bit funny when using the newer extensions (im looking at you ipad 2!)
If you find on older devices that things have gone a bit weird then set this to true.

Properties:
Name Type Description
FORCE_NATIVE Boolean

attributesArray

An array of attributes

dirtyBoolean

A boolean flag

glWebGLRenderingContext

The current WebGL rendering context

indexBufferPIXI.glCore.GLBuffer

Methods

Uses this vao

addAttribute(buffer, attribute, type, normalized, stride, start)

Name Type Description
buffer PIXI.gl.GLBuffer
attribute *
type String
normalized Boolean
stride Number
start Number

addIndex(buffer)

Name Type Description
buffer PIXI.gl.GLBuffer

Binds the buffer

Unbinds this vao and disables it

Destroy this vao

draw(type, size, start)

Name Type Description
type Number
size Number
start Number

Unbinds the buffer