I have written a program for displaying a model using WebGL. The program takes the input data(-vertices, indices, color) from an XML and is working very well. However, it takes some amount of time (during which the browser is unresponsive) to load the vertex data before drawing the model. Once it obtains the data it works as though the model is manipulated in a desktop application.
How can I be able to draw the model (step-by-step) as the vertex data is sent to the program? This could display the model slowly as the vertices are being fed. And for ease, I have the program in such a way, that I did not use an index array. The vertices are aligned in the vertex array based on the index data. So, I could use gl.drawArrays automatically without using gl.drawElements (the reason being - for color).
So, finally, is there a way for the progressive rendering? so that the code streams the vertices as they come in? I have seen examples of progressive rendering in http://webgl-loader.googlecode.com/svn/trunk/samples/happy/happy.html and read similar stuff in Three.js. I did not use any framework like Three.js.
It would help if you have a simple example program for progressive rendering.