16

Well I have a device which supports OpenGl ES 2.0 (HTC Desire), and of course deploy app on device much faster than on emulator. Default android emulator does not support 2.0, androidX86 project and similar androbox project does not support native code (NDK) so even Hello-Jni crash on them (all samples works fine on standart AVD except Hello-GL2 sample ofc), don't know supports they a OpenGL ES 2.0 or not, please tell me.

So if there is a development in native way (NDK) with OpenGl 2.0 support - how is possible to test app without device?

greybeard
  • 2,249
  • 8
  • 30
  • 66
Aristarhys
  • 2,092
  • 7
  • 37
  • 68
  • Can't you just test it on the device? I don't think I've ever really had to use the emulator. – James M Jan 20 '12 at 11:56
  • 1
    Well i do, but i'm not dev alone, there is atleast another one person and he has't any Android device yet. And if i just broke my device, which should i do? Well buying new/repairing is good point, but there is always be some alternative. – Aristarhys Jan 20 '12 at 12:13
  • @JamesMcLaughlin That would be an option only if you actually *have* a device. – Jashaszun Oct 16 '13 at 01:59
  • @Jashaszun If you don't and you manage to successfully develop and publish an application, I raise my hat to you. – James M Oct 17 '13 at 13:26
  • 1
    @JamesMcLaughlin That's exactly what I hope to do, since I can't afford an android phone. :) – Jashaszun Oct 23 '13 at 16:25
  • Possible duplicate of [Does the Android Emulator support OpenGL ES 2.0?](http://stackoverflow.com/questions/4455783/does-the-android-emulator-support-opengl-es-2-0) – Ciro Santilli OurBigBook.com Mar 04 '17 at 11:42

4 Answers4

22

The emulator now supports OpenGL: http://android-developers.blogspot.com/2012/04/faster-emulator-with-better-hardware.html

Be sure to add the GPU emulation hardware property and set it to yes when creating the avd (per the link below):

http://developer.android.com/tools/devices/emulator.html

Flynn81
  • 4,108
  • 29
  • 28
  • 1
    i can confirm this. it is not enabled by default, you have to enable it yourself. you can then run the sample 'hello-gl2' that comes with the NDK to verify if you wish. – don bright Jul 20 '12 at 15:39
  • @Flynn81 I cannot confirm this. Doesn't work for mine at all. I have posted an unanswered similar question on my profile dealing with the common open gl 2 android error (nullpointerexception) please check it out if you know anything more – michaelsnowden Nov 15 '13 at 21:22
18

Update: As correctly stated by a StackOverflow user, the android emulator now supports OpenGL ES 2.0 (Feb 2017)

https://sites.google.com/a/android.com/tools/recent/androidemulatorrevision2530feb2017


As stated by Google itself, in the official Android documentation, the Android emulator does not support yet the OpenGL ES 2.0 features.

Please refer to this official document.

http://developer.android.com/resources/tutorials/opengl/opengl-es20.html

I hope this answers your question.

For OpenGles20 emulator you can use GenyMotion www.genymotion.com/

Maurizio Benedetti
  • 3,557
  • 19
  • 26
  • Well i understand that clearly - read my first post, question if is exist some kind of alternative emulator which support OpenGL ES and native code. – Aristarhys Jan 21 '12 at 06:24
  • 1
    in my humble experience based in about 1 year of deep NDK development with OpenGL ES 2.0, no, there is no way. :( Best way is to test on a device, even if the emulator would support the shaders, it would be way to slow to run then in an effective way. – Maurizio Benedetti Jan 21 '12 at 09:17
  • 8
    This is no longer the case, with adt 17 and up and the 4.0.3 rev 3 sdk you can create AVDs with OpenGL support. – Flynn81 Jun 24 '12 at 14:05
  • 2
    From that link `Note: Be careful not to mix OpenGL ES 1.x API calls with OpenGL ES 2.0 methods! The two APIs are not interchangeable and trying to use them together only results in frustration and sadness.` lol – Basic Mar 03 '13 at 11:36
  • This answer is out of date now. The emulator supports open gl 2.0. https://sites.google.com/a/android.com/tools/recent/androidemulatorrevision2530feb2017 – Cypress Frankenfeld Feb 14 '17 at 20:28
1

As of Feb 2017, emulator 25.3.0 supports OpenGL 2.0 fully.

https://sites.google.com/a/android.com/tools/recent/androidemulatorrevision2530feb2017

Fully GLES 2.0 compliant. Given a host GPU that has conformant desktop OpenGL drivers, the emulator now passes 100% of CTS dEQP-GLES2 must-pass.

After it stabilizes, assuming there are no critical bugs with it, you should be able to test with it.

Cypress Frankenfeld
  • 2,317
  • 2
  • 28
  • 40
0

you can use the intel based emulator currently released. Just update your sdk and you can run the open gl application on the emulator too.

Deepak Goel
  • 5,624
  • 6
  • 39
  • 53