diff --git a/cocos2d/core/graphics/graphics-webgl-cmd.js b/cocos2d/core/graphics/graphics-webgl-cmd.js index c694e6896e..06ef569ff8 100644 --- a/cocos2d/core/graphics/graphics-webgl-cmd.js +++ b/cocos2d/core/graphics/graphics-webgl-cmd.js @@ -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);