Phaser API Documentation

  Version: 
createVertexBuffer(initialDataOrSize, bufferUsage)

Description:

Wrapper for creating a vertex buffer.

Parameters:

name type description
initialDataOrSize ArrayBuffer

It's 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 vertex buffer

Type:
  • WebGLBuffer
Examples:
Since: 3.0.0