Method GL.GLSLUtils.VertexBuffer()->stream()


Method stream

void stream(array(float) data)

Description

Append the data to the current object. Once the end of the buffer has been reached, start over from the beginning. This is useful for particle systems of various kinds, where each vertex (or every few vertices) indicate a separate particle that evolves over time using a GLSLProgram, and there is no need to send the whole list to the graphic card each frame.

When calling glDrawArrays using this kind of VertexBuffer, use the current_size member variable, it indicates the last fully written vertice.