Phaser API Documentation

  Version: 
createIndexBuffer(initialDataOrSize, bufferUsage)

Description:

Wrapper for creating a vertex buffer.

Parameters:

name type description
initialDataOrSize ArrayBuffer

Either ArrayBuffer or an integer indicating the size of the vbo.

bufferUsage number

How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW.

Returns:
Description:

Raw index buffer

Type:
  • WebGLBuffer
Examples:
Since: 3.0.0