From 875a2d83b11e878baf5d32fd57cb3079db3e9882 Mon Sep 17 00:00:00 2001 From: VisualSj Date: Tue, 22 Dec 2015 18:36:48 +0800 Subject: [PATCH 1/2] Close webgl dedicated test in canvas mode --- tests/js-tests/src/ParticleTest/ParticleTest.js | 2 +- tests/js-tests/src/RenderTextureTest/RenderTextureTest.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/js-tests/src/ParticleTest/ParticleTest.js b/tests/js-tests/src/ParticleTest/ParticleTest.js index 8ec2d7b1fa..6ca5443e72 100644 --- a/tests/js-tests/src/ParticleTest/ParticleTest.js +++ b/tests/js-tests/src/ParticleTest/ParticleTest.js @@ -138,7 +138,7 @@ var particleSceneArr = [ } ]; -if( 'opengl' in cc.sys.capabilities ){ +if( 'opengl' in cc.sys.capabilities && cc._renderType === cc.game.RENDER_TYPE_WEBGL){ particleSceneArr.push( function () { return new ParallaxParticle(); }); diff --git a/tests/js-tests/src/RenderTextureTest/RenderTextureTest.js b/tests/js-tests/src/RenderTextureTest/RenderTextureTest.js index 5cab706ea5..6cf84c76ab 100644 --- a/tests/js-tests/src/RenderTextureTest/RenderTextureTest.js +++ b/tests/js-tests/src/RenderTextureTest/RenderTextureTest.js @@ -673,7 +673,7 @@ var arrayOfRenderTextureTest = [ Issue1464 ]; -if(('opengl' in cc.sys.capabilities) && (!cc.sys.isNative) ){ +if(('opengl' in cc.sys.capabilities) && cc._renderType === cc.game.RENDER_TYPE_WEBGL && (!cc.sys.isNative) ){ arrayOfRenderTextureTest.push(RenderTextureIssue937); arrayOfRenderTextureTest.push(RenderTextureZbuffer); arrayOfRenderTextureTest.push(RenderTextureTestDepthStencil); From 843694cea5a4dbdf03941599c3402b9e409f2530 Mon Sep 17 00:00:00 2001 From: VisualSj Date: Tue, 22 Dec 2015 18:46:30 +0800 Subject: [PATCH 2/2] Close webgl dedicated test in canvas mode --- tests/js-tests/src/SpriteTest/SpriteTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/js-tests/src/SpriteTest/SpriteTest.js b/tests/js-tests/src/SpriteTest/SpriteTest.js index 9ce1da7414..af206819cc 100644 --- a/tests/js-tests/src/SpriteTest/SpriteTest.js +++ b/tests/js-tests/src/SpriteTest/SpriteTest.js @@ -977,7 +977,7 @@ var SpriteZVertex = SpriteTestDemo.extend({ this._super(cc.color(255, 0, 0, 80), cc.color(255, 98, 117, 20)); - if ("opengl" in cc.sys.capabilities) { + if ("opengl" in cc.sys.capabilities && cc._renderType === cc.game.RENDER_TYPE_WEBGL) { gl.enable(gl.DEPTH_TEST); //