VertexArray

VertexArray

Members

:Buffer

DOC_TBA

:Number

DOC_TBA

Methods

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

Only call this if the vertex array owns the vertex buffers referenced by the attributes and owns its index buffer; otherwise, the owner of the buffers is responsible for destroying them. A vertex or index buffer is only destroyed if it's getVertexArrayDestroyable function returns true (the default). This allows combining destroyable and non-destroyable buffers in the same vertex array.

Once an object is destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception. Therefore, assign the return value (undefined) to the object as done in the example.

Throws:
DeveloperError : This vertex array was destroyed, i.e., destroy() was called.
Returns:
Example
// Destroying the vertex array implicitly calls destroy for each of its vertex
// buffers and its index buffer.
var vertexBuffer = context.createVertexBuffer(new Float32Array([0, 0, 0]),
    Cesium.BufferUsage.STATIC_DRAW);
var vertexArray = context.createVertexArray({
    vertexBuffer : vertexBuffer,
    componentsPerAttribute : 3
});
// ...
vertexArray = vertexArray.destroy();
// Calling vertexBuffer.destroy() would throw DeveloperError at this point.
See:

DOC_TBA index is the location in the array of attributes, not the index property of an attribute.

Throws:
DeveloperError : This vertex array was destroyed, i.e., destroy() was called.

Returns true if this object was destroyed; otherwise, false.

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.

Returns:
Boolean True if this object was destroyed; otherwise, false.
See: