API Docs for: 1.4.0
Show:

Kiwi.Renderers.GLElementArrayBuffer Class

Module: Renderers
Parent Module: Kiwi

Encapsulates a WebGL Element Array Buffer

Constructor

Kiwi.Renderers.GLElementArrayBuffer

(
  • gl
  • [_itemSize]
  • [_indices]
  • [init=true]
)
GLElementArrayBuffer

Parameters:

  • gl WebGLRenderingContent
  • [_itemSize] Number optional
  • [_indices] Number optional
  • [init=true] Boolean optional

Returns:

GLElementArrayBuffer:

Item Index

Methods

Properties

Methods

clear

() public

Clears the indices array.

init

(
  • gl
)
WebGLBuffer public

Initialises the Element Array Buffer

Parameters:

  • gl WebGLRenderingContext

Returns:

WebGLBuffer:

refresh

(
  • gl
  • indices
)
WebGLBuffer public

Refreshes the Element Array Buffer

Parameters:

  • gl WebGLRenderingContext
  • indices Number

Returns:

WebGLBuffer:

Properties

buffer

WebGLBuffer public

The Element Array Buffer object

indices

Number public

An array of indices

itemSize

Number public

The size of each buffer item

numItems

Number public

The numbe of items in the buffer

square

Number public static

The required indices for a single quad.

Default: [0,1,2,0,2,3]