update method
dynamic
update(
- dynamic count,
- dynamic mode,
- dynamic instanceCount
Implementation
update(count, mode, instanceCount) {
render["calls"] = render["calls"]! + 1;
if (mode == gl.TRIANGLES) {
render["triangles"] = render["triangles"]! + instanceCount * (count / 3.0);
} else if (mode == gl.LINES) {
render["lines"] = render["lines"]! + instanceCount * (count / 2);
} else if (mode == gl.LINE_STRIP) {
render["lines"] = render["lines"]! + instanceCount * (count - 1);
} else if (mode == gl.LINE_LOOP) {
render["lines"] = render["lines"]! + instanceCount * count;
} else if (mode == gl.POINTS) {
render["points"] = render["points"]! + instanceCount * count;
} else {
print('three.WebGLInfo: Unknown draw mode: $mode ');
}
}