@@ -88,7 +88,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
8888 this . _shader . setUniformLocationWith1f ( this . _pointSizeLocation , this . _pointSize ) ;
8989
9090 var pointBuffer = glContext . createBuffer ( ) ;
91- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
91+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
9292 glContext . bufferData ( glContext . ARRAY_BUFFER , new Float32Array ( [ point . x , point . y ] ) , glContext . STATIC_DRAW ) ;
9393 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
9494
@@ -117,7 +117,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
117117 this . _shader . setUniformLocationWith1f ( this . _pointSizeLocation , this . _pointSize ) ;
118118
119119 var pointBuffer = glContext . createBuffer ( ) ;
120- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
120+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
121121 glContext . bufferData ( glContext . ARRAY_BUFFER , this . _pointsToTypeArray ( points ) , glContext . STATIC_DRAW ) ;
122122 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
123123
@@ -151,7 +151,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
151151 this . _shader . setUniformLocationWith4fv ( this . _colorLocation , this . _colorArray ) ;
152152
153153 var pointBuffer = glContext . createBuffer ( ) ;
154- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
154+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
155155 glContext . bufferData ( glContext . ARRAY_BUFFER , this . _pointsToTypeArray ( [ origin , destination ] ) , glContext . STATIC_DRAW ) ;
156156 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
157157
@@ -206,7 +206,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
206206 this . _shader . setUniformLocationWith4fv ( this . _colorLocation , this . _colorArray ) ;
207207
208208 var pointBuffer = glContext . createBuffer ( ) ;
209- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
209+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
210210 glContext . bufferData ( glContext . ARRAY_BUFFER , this . _pointsToTypeArray ( vertices ) , glContext . STATIC_DRAW ) ;
211211 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
212212
@@ -237,7 +237,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
237237 this . _shader . setUniformLocationWith4fv ( this . _colorLocation , this . _colorArray ) ;
238238
239239 var pointBuffer = glContext . createBuffer ( ) ;
240- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
240+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
241241 glContext . bufferData ( glContext . ARRAY_BUFFER , this . _pointsToTypeArray ( poli ) , glContext . STATIC_DRAW ) ;
242242 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
243243 glContext . drawArrays ( glContext . TRIANGLE_FAN , 0 , poli . length ) ;
@@ -285,7 +285,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
285285 this . _shader . setUniformLocationWith4fv ( this . _colorLocation , this . _colorArray ) ;
286286
287287 var pointBuffer = glContext . createBuffer ( ) ;
288- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
288+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
289289 glContext . bufferData ( glContext . ARRAY_BUFFER , vertices , glContext . STATIC_DRAW ) ;
290290 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
291291
@@ -323,7 +323,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
323323 this . _shader . setUniformLocationWith4fv ( this . _colorLocation , this . _colorArray ) ;
324324
325325 var pointBuffer = glContext . createBuffer ( ) ;
326- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
326+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
327327 glContext . bufferData ( glContext . ARRAY_BUFFER , vertices , glContext . STATIC_DRAW ) ;
328328 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
329329
@@ -362,7 +362,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
362362 this . _shader . setUniformLocationWith4fv ( this . _colorLocation , this . _colorArray ) ;
363363
364364 var pointBuffer = glContext . createBuffer ( ) ;
365- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
365+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
366366 glContext . bufferData ( glContext . ARRAY_BUFFER , vertices , glContext . STATIC_DRAW ) ;
367367 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
368368 glContext . drawArrays ( glContext . LINE_STRIP , 0 , segments + 1 ) ;
@@ -422,7 +422,7 @@ cc.DrawingPrimitiveWebGL = cc.Class.extend(/** @lends cc.DrawingPrimitiveWebGL#
422422 this . _shader . setUniformLocationWith4fv ( this . _colorLocation , this . _colorArray ) ;
423423
424424 var pointBuffer = glContext . createBuffer ( ) ;
425- cc . glBindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
425+ glContext . bindBuffer ( glContext . ARRAY_BUFFER , pointBuffer ) ;
426426 glContext . bufferData ( glContext . ARRAY_BUFFER , vertices , glContext . STATIC_DRAW ) ;
427427 glContext . vertexAttribPointer ( cc . VERTEX_ATTRIB_POSITION , 2 , glContext . FLOAT , false , 0 , 0 ) ;
428428 glContext . drawArrays ( glContext . LINE_STRIP , 0 , segments + 1 ) ;
0 commit comments