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
-
activate()
-
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 -
bind()
-
Binds the buffer
-
clear()
-
Unbinds this vao and disables it
-
destroy()
-
Destroy this vao
-
draw(type, size, start)
-
Name Type Description type
Number size
Number start
Number -
unbind()
-
Unbinds the buffer