Kiwi.Renderers.GLArrayBuffer Class
Encapsulates a WebGL Array Buffer
Constructor
Kiwi.Renderers.GLArrayBuffer
(
Kiwi.RenderersGLArrayBuffer
-
gl
-
[_itemSize]
-
[items]
-
[init=true]
Parameters:
-
gl
WebGLRenderingContext -
[_itemSize]
Number optional -
[items]
Number optional -
[init=true]
Boolean optional
Returns:
Kiwi.RenderersGLArrayBuffer:
Item Index
Methods
Properties
- buffer
- created
- created
- items
- itemSize
- numItems
- squareCols static
- squareUVs static
- squareVertices static
Methods
clear
()
public
Clears the item array.
createBuffer
(
WebGLBuffer
public
-
gl
Creates the array buffer.
Parameters:
-
gl
WebGLRenderingContext
Returns:
WebGLBuffer:
deleteBuffer
(
Boolean
public
-
gl
Deletes the array buffer.
Parameters:
-
gl
WebGLRenderingContext
Returns:
Boolean:
uploadBuffer
(
Boolean
public
-
gl
-
items
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]