From 1980311204c5956f552a4d0ac9fbadce266aaf71 Mon Sep 17 00:00:00 2001 From: pandamicro Date: Sat, 7 May 2016 17:31:58 +0800 Subject: [PATCH] Fix OpenGL test issue on web --- tests/js-tests/src/OpenGLTest/OpenGLTest.js | 8 +++++--- web | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/js-tests/src/OpenGLTest/OpenGLTest.js b/tests/js-tests/src/OpenGLTest/OpenGLTest.js index 8443e52ec6..f8072bc4ae 100644 --- a/tests/js-tests/src/OpenGLTest/OpenGLTest.js +++ b/tests/js-tests/src/OpenGLTest/OpenGLTest.js @@ -458,7 +458,8 @@ var GLNodeCCAPITest = OpenGLTestLayer.extend({ this.shader.use(); this.shader.setUniformsForBuiltins(); - cc.glEnableVertexAttribs( cc.VERTEX_ATTRIB_FLAG_COLOR | cc.VERTEX_ATTRIB_FLAG_POSITION); + gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_COLOR); + gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_POSITION); // Draw fullscreen Square gl.bindBuffer(gl.ARRAY_BUFFER, this.squareVertexPositionBuffer); @@ -604,7 +605,7 @@ var ShaderNode = cc.GLNode.extend({ this.shader.setUniformLocationF32( this.uniformCenter, centerx, centery); this.shader.setUniformLocationF32( this.uniformResolution, 256, 256); - cc.glEnableVertexAttribs( cc.VERTEX_ATTRIB_FLAG_POSITION ); + gl.enableVertexAttribArray( cc.VERTEX_ATTRIB_POSITION ); // Draw fullscreen Square gl.bindBuffer(gl.ARRAY_BUFFER, this.squareVertexPositionBuffer); @@ -1088,7 +1089,8 @@ var TexImage2DTest = OpenGLTestLayer.extend({ this.shader.setUniformsForBuiltins(); gl.bindTexture(gl.TEXTURE_2D, this.my_texture); - cc.glEnableVertexAttribs( cc.VERTEX_ATTRIB_FLAG_TEX_COORDS | cc.VERTEX_ATTRIB_FLAG_POSITION); + gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_POSITION); + gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_TEX_COORDS); // Draw fullscreen Square gl.bindBuffer(gl.ARRAY_BUFFER, this.squareVertexPositionBuffer); diff --git a/web b/web index f21308833d..d176dc4f74 160000 --- a/web +++ b/web @@ -1 +1 @@ -Subproject commit f21308833d4ff8594c691f001a235a7e8a2dcd0b +Subproject commit d176dc4f74396746445112d030c2fa63875e5bf8