Closed shrekshao closed 8 years ago
@shrekshao merge in master so this can be auto-merged.
@trungtle let me know when you are happy with this, and I will review.
What is the point of this sample? How is it different than the instancing sample?
void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
with different GLint first
, draw arrays start with an offset in the vertex array. So the two rects are using different vertex pos data, comparing to instancing, using the same set of vertex array.
Ah, OK. Are you sure about the sample name? I think people are going to confuse it with drawRangeElements
, which will likely not be part of WebGL 2.
draw_range_elements
We'll keep the name, but if folks get confused, we can consider a rename to something like draw_instanced_first
.
Getting rid of UBO cause I can't get it work correctly within a short time.
But the sample is enough to demonstrate the feature: draw range arrays.