title: Android opengl es shader compile error
body: <p>i get a shader compile error in my android project and i have no idea whats wrong with it:<br></p>
  
  <pre><code>Shader compile error: Vertex shader compilation failed.
  ERROR: 0:4: 'gl_FragColor' : undeclared identifier
  ERROR: 0:4: 'assign' :  cannot convert from 'varying 4-component vector of float' to 'float'
  ERROR: 2 compilation errors.  No code generated.
  </code></pre>
  
  <p>VertexShader:</p>
  
  <pre><code>uniform mat4 u_MVPMatrix;
  attribute vec4 a_Position;
  attribute vec4 a_Color;
  varying vec4 v_Color;
  void main() {
      v_Color = a_Color;
      gl_Position = u_MVPMatrix * a_Position;
  }
  </code></pre>
  
  <p>Fragment Shader:</p>
  
  <pre><code>precision mediump float;
  varying vec4 v_Color;
  void main() {                         
    gl_fragcolor = v_Color;
  } 
  </code></pre>
  
  <p>The vertex shader compiles perfect, but the fragment shader doesn't work.
  Since the code is from a tutorial it should work and when i launch the tutorial project there is no compilation error. I don't understand it because i copied the shader code 1:1 multiple times now and it still won't work.</p>
  
  <p>Solved: I found the problem... I was compiling the shader via a method but the method always used glCreateShader(GL_VERTEX_SHADER); no wonder it couldn't compile the fragment shader. Also this is the reason why on the log it says 'Vertex shader compilation failed', such a dump mistake costs tons of hours...^^</p>