draw method
Implementation
void draw(int mode, int count, int type, int offset, int instanceCount,
bool hasTransforms) {
if (hasTransforms) _gl.beginTransformFeedback(mode);
if (type != -1) {
if (instanceCount > 1) {
_gl.drawElementsInstanced(mode, count, type, offset, instanceCount);
} else {
_gl.drawElements(mode, count, type, offset);
}
} else {
if (instanceCount > 1) {
_gl.drawArraysInstanced(mode, offset, count, instanceCount);
} else {
_gl.drawArrays(mode, offset, count);
}
}
if (hasTransforms) _gl.endTransformFeedback();
}