Merge pull request #1203 from 2youyou2/graphics-warn

add graphics warn
This commit is contained in:
Jare Guo
2016-10-17 11:59:48 +08:00
committed by GitHub
@@ -325,6 +325,10 @@ Js.mixin(_p, {
this._indicesDirty = false;
}
if (this._vertsOffset > 65536) {
cc.warn('Too many graphics vertices generated, only 65536 vertices support.');
}
gl.enableVertexAttribArray(cc.macro.VERTEX_ATTRIB_POSITION);
gl.vertexAttribPointer(cc.macro.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, VERTS_BYTE_LENGTH, 0);