API Docs for: 1.4.0
Show:

Kiwi.Renderers.GLArrayBuffer Class

Module: Renderers
Parent Module: Kiwi

Encapsulates a WebGL Array Buffer

Constructor

Kiwi.Renderers.GLArrayBuffer

(
  • gl
  • [_itemSize]
  • [items]
  • [init=true]
)
Kiwi.RenderersGLArrayBuffer

Parameters:

  • gl WebGLRenderingContext
  • [_itemSize] Number optional
  • [items] Number optional
  • [init=true] Boolean optional

Returns:

Kiwi.RenderersGLArrayBuffer:

Methods

clear

() public

Clears the item array.

createBuffer

(
  • gl
)
WebGLBuffer public

Creates the array buffer.

Parameters:

  • gl WebGLRenderingContext

Returns:

WebGLBuffer:

deleteBuffer

(
  • gl
)
Boolean public

Deletes the array buffer.

Parameters:

  • gl WebGLRenderingContext

Returns:

Boolean:

uploadBuffer

(
  • gl
  • items
)
Boolean public

Uploads the array buffer.

Parameters:

  • gl WebGLRenderingContext
  • items Array

Returns:

Boolean:

Properties

buffer

WebGLBuffer public

The WebGL buffer Object

created

Boolean public

Returns whether the buffer has been created

created

Boolean public

Returns whether the buffer has been uploaded to video memory

items

Number public

The items ito upload to the buffer

itemSize

Number public

The size of each item in the buffer.

numItems

Number public

The number of items in the buffer

squareCols

Number public static

Default: [1, 1, 1, 1]

squareUVs

Number public static

Default: [0, 0, .1, 0, .1, .1, 0, .1]

squareVertices

Number public static

Default: [0, 0, 100, 0, 100, 100, 0, 100]