title: Android OpenGL ES 3.0 error on Samsung Galaxy tab 3 and Nexus 7
body: <p>I have a application which I am trying to run on Samsung galaxy tab 3 (Android 4.4.2) and nexus 7 (Android 5.0). The application can use Opengl ES 2.0 Or opengl ES 3.0. When I am using Opengl ES 2.0, it works fine on both the tablets. When I use OpenGL ES 3.0, I get errors. My Android.Manifest file is as follow and I change it according to opengl es version</p>
  
  <pre><code>&lt;uses-feature android:glEsVersion="0x00030000"/&gt;
  &lt;uses-sdk android:minSdkVersion="19"/&gt;
  </code></pre>
  
  <p>I am creating the context by following code</p>
  
  <pre><code>private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
  public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
      Log.w(TAG, "creating OpenGL ES 3.0 context");
      checkEglError("Before eglCreateContext", egl);
      int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL10.EGL_NONE };
      EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
      checkEglError("After eglCreateContext", egl);
      return context;
  }
  </code></pre>
  
  <p>I have created a configChooser class also which uses following config. I am using it with Opengl es 2.0 and 3.0. I am not sure if I need to change it for opengl es 3.0. I</p>
  
  <pre><code>private static int EGL_OPENGL_ES2_BIT = 4;
  private static int[] s_configAttribs2 =
      {
          EGL10.EGL_RED_SIZE, 4,
          EGL10.EGL_GREEN_SIZE, 4,
          EGL10.EGL_BLUE_SIZE, 4,
          EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
          EGL10.EGL_NONE
      };
  </code></pre>
  
  <p>My Application.mk is as following</p>
  
  <pre><code>APP_ABI := armeabi-v7a
  </code></pre>
  
  <p>Following are errors</p>
  
  <p><b>Samsung Galaxy tab 3</b></p>
  
  <p>It says something like <b>dlopen failed: libraryname.so have unexpected e-machine: 40</b>. I searched and found that this error comes as my device architecture is different and I should be building with <b>APP_ABI := x86</b>, but I dont think this is the case as when I am using opengles 2.0, everything is working fine. My Device architecture will remain same in case of opengles 2.0 and opengles 3.0 and if it works in opengles 2.0, it should work in opengles 3.0 also. Still I tried it with <b>APP_ABI := x86</b> and it gives me following error <b> java.lang.RuntimeException: CreateContext failed: ELG_SUCCESS</b> I think its failing to create context in this case. I am also attaching the error screen shot </p>
  
  <p><a href="https://i.stack.imgur.com/psnPJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/psnPJ.png" alt="enter image description here"></a>
  With <b> APP_ABI := armeabi-v7a</b></p>
  
  <p><a href="https://i.stack.imgur.com/YeIbb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YeIbb.png" alt="enter image description here"></a>
  with <b>APP_ABI := x86</b></p>
  
  <p>I also tried directly calling the setEGLContextClientVersion function without calling setEGLContextFactory and setEGLConfigChooser on renderer. I get same "dlopen failed: libraryname.so have unexpected e-machine: 40."</p>
  
  <p><b> Nexux 7 </b>
  When I run my application on Nexus the error is</p>
  
  <p><b> Called Unimplemented opengl es api</b></p>
  
  <p>This error comes when I call my draw functions in native code. I am not able to pinpoint exact command as I am not able to debug my native code. I am using VAO and VBO to draw.When I am using opengl es 2.0, it works fine. I an using just VBO to draw in that code.</p>
  
  <p>I also tried directly calling the setEGLContextClientVersion(3) without calling setEGLContextFactory and setEGLConfigChooser on renderer. I get <b> "java.lang.IlegalArgumentException: No Configs match configSpecs" </b> error in this case</p>