Fixed bug in Android WebGL by turning on and off all varying attributes when switching shaders.
Fixed bug in Android WebGL by turning on and off all varying attributes when switching shaders.

--- a/src/js/circuit/PCB/ElementLine.js
+++ b/src/js/circuit/PCB/ElementLine.js
@@ -55,6 +55,7 @@
 
 		gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
 		gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, this.vertexBuffer.itemSize, gl.FLOAT, false, 0, 0);
+
 		gl.drawArrays(gl.TRIANGLE_STRIP, 0, this.vertexBuffer.numItems);
 
 		gl.uniform1f(shaderProgram.innerRadiusUniform, 0.0);
@@ -98,6 +99,7 @@
 		oy2 = this.y2;
 
 		vBuffer = gl.createBuffer();
+
 		gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer);
 
 		var rise = oy2 - oy1;
@@ -158,6 +160,7 @@
 		this.vertexBuffer = this.generateLineBuffer(gl, this.thick);
 
 		vBuffer = gl.createBuffer();
+
 		gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer);
 		gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ox1,oy1,0.0,ox2,oy2,0.0]), gl.STATIC_DRAW);
 		vBuffer.itemSize = 3;

--- a/src/js/circuit/PCB/Renderers/GLRenderer.js
+++ b/src/js/circuit/PCB/Renderers/GLRenderer.js
@@ -171,7 +171,8 @@
 				this.layers[i].init3DArrays(gl);
 			for(i in this.symbols)
 				this.symbols[i].init3DArrays(this.ctx);
-		}
+
+		};
 
 		GLRenderer.prototype.resize = function(){
 
@@ -208,7 +209,9 @@
 			glMatrix.mat4.scale(mvMatrix, [scaleFactor, scaleFactor, 1.0]);
 			glMatrix.mat4.translate(mvMatrix, [-offsetX, -offsetY, 0.0]);
 
+	        gl.disableVertexAttribArray(this.texShaderProgram.vertexPositionAttribute);
 	        gl.disableVertexAttribArray(this.texShaderProgram.textureCoordAttribute);
+	        gl.enableVertexAttribArray(this.shaderProgram.vertexPositionAttribute);
 	        gl.disable(gl.BLEND);
 
 	        gl.useProgram(this.shaderProgram);
@@ -275,6 +278,8 @@
 			gl.uniformMatrix4fv(this.texShaderProgram.pMatrixUniform, false, oMatrix);
 	        gl.uniformMatrix4fv(this.texShaderProgram.mvMatrixUniform, false, mvMatrix);
 
+	        gl.disableVertexAttribArray(this.shaderProgram.vertexPositionAttribute);
+	        gl.enableVertexAttribArray(this.texShaderProgram.vertexPositionAttribute);
 	        gl.enableVertexAttribArray(this.texShaderProgram.textureCoordAttribute);
 
 	        gl.enable(gl.BLEND);
@@ -309,8 +314,7 @@
 
 	        }
 
-
-		}
+		};
 
 		return GLRenderer;