title: How to enable OpenGL extension GL_EXT_shader_framebuffer_fetch on Android?
body: <p>I'm developing an Android app with OpenGL ES 2.0 and I'd like to use the <strong><a href="https://www.khronos.org/registry/gles/extensions/EXT/EXT_shader_framebuffer_fetch.txt" rel="nofollow noreferrer">GL_EXT_shader_framebuffer_fetch</a> extension</strong>.</p>
  
  <p>From what I understand, I need to enable it first with the <code>#extension</code> directive at the top of my fragment shader, and then I can use the built-in variable <code>gl_LastFragData</code>.</p>
  
  <p>So here is my fragment shader:</p>
  
  <pre><code>#extension GL_EXT_shader_framebuffer_fetch : require
  // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ &lt;- Enable the extension
  
  varying highp vec2 textureCoords;
  uniform sampler2D currentTexture;
  
  void main()
  {
      vec4 currentColor = texture2D(currentTexture, textureCoords);
      gl_FragColor = currentColor;
  }
  </code></pre>
  
  <p>However, when I compile the shader, I get the following compilation error:</p>
  
  <pre><code>Couldn't compile shader: Fragment shader compilation failed.
  ERROR: 0:1: '' :     GLSL error: extension 'GL_EXT_shader_framebuffer_fetch' is not supported
  ERROR: 1 compilation errors. No code generated.
  </code></pre>
  
  <p>The error is pretty explicit: <strong>this extension is not</strong> <strong><em>supported</em></strong>.</p>
  
  <p>My technical specs:</p>
  
  <ul>
  <li><strong>Hardware</strong>: Samsung Galaxy S4</li>
  <li><strong>Android version</strong>: 5.0.1</li>
  <li><strong>Android API level</strong>: 21</li>
  <li><strong>OpenGL version</strong> (<code>glGetString(GL_VERSION)</code>): OpenGL ES 3.0 V@84.0 AU@  (CL@)</li>
  </ul>
  
  <p>I have a few questions:</p>
  
  <ul>
  <li>Is there anything I can do to <strong>install</strong> this extension on my device?</li>
  <li>If not, can I install it/use it on an <strong>emulator</strong>?</li>
  <li>Is it a <em>software</em> matter or really a <em>hardware</em> problem?</li>
  </ul>