Android Emulator Now Supports Native OpenGL ES2.0!

For those of you who may have missed it, the Android team recently released an upgraded emulator image that has support for native OpenGL ES 2.0! That’s right; not only is it now supported, but the calls are translated to desktop OpenGL so they can be accelerated by your native graphics layer. It’s still better to test on an actual device, but this is a great boon for those who want to try out their app on different form factors without having to go out and buy a bunch of tablets and devices.

Check out the video:

Three notes about the GPU emulation

  1. First, you need to edit your emulator image, go down to the hardware section, and add “GPU Emulation” and set it to true.
  2. Second, there’s a bug with the emulator such that this line: “final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0×20000;” does not work. It will always return false. You can add “|| Build.FINGERPRINT.startsWith(“generic”)” or simply comment out these checks and assume that OpenGL ES 2 is supported, when running on the emulator.
  3. Finally, if it crashes with “no config found”, try adding this line before the call to “setRenderer(…)”: “glSurfaceView.setEGLConfigChooser(8 , 8, 8, 8, 16, 0);”

A quick roundup

Hope that everyone is enjoying the gradually improving weather out there.

About the book

Android is booming like never before, with millions of devices shipping every day. In OpenGL ES 2 for Android: A Quick-Start Guide, you’ll learn all about shaders and the OpenGL pipeline, and discover the power of OpenGL ES 2.0, which is much more feature-rich than its predecessor.

It’s never been a better time to learn how to create your own 3D games and live wallpapers. If you can program in Java and you have a creative vision that you’d like to share with the world, then this is the book for you.


Author: Admin

Kevin is the author of OpenGL ES 2 for Android: A Quick-Start Guide. He also has extensive experience in Android development.

16 thoughts on “Android Emulator Now Supports Native OpenGL ES2.0!”

  1. this is super awesome!Now there’s really no need to buy those expensive tablets.

  2. How should i do this .I should make changes in android SDK ?? I dont have mobile device and only way to run my app is Android AVD ..So please explain me in step by step .I will be very thank full!!!!!! pls help.

    1. Hi Avinash,

      You will need to do the following:

      1) Add Android 4.0.3 (or later) image.
      2) Edit the image. Next to “Hardware:”, Select “New…”
      3) Add “GPU emulation”.
      4) Set its value to “Yes”.
      5) In your code, comment out any checks of configurationInfo.reqGlEsVersion — this won’t work on the emulator.

      That’s pretty much it! It should be working after that.

      1. Hi, can you explain more about steps? where I find Android 4.0.3 image?
        I downloaded ‘’ …..
        I wanna know how to run my OpenGL ES2 app on emulator. thanks in advance

    1. Is that even with the fix by changing “final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0×20000;” ? You can just set it to true. You also have to ensure that “GPU Emulation” is true and that you’re using a 4.0.3+ emulator.

      Let me know!

Leave a Reply

Your email address will not be published. Required fields are marked *