Difference between revisions of "Using the emulator"

From JPCT
Jump to: navigation, search
(Emulator and OpenGL ES 2.0)
 
(One intermediate revision by the same user not shown)
Line 30: Line 30:
  
 
You can watch a video of this new feature in action by clicking on the following link: [https://www.youtube.com/watch?v=T--vFtyZvc4]
 
You can watch a video of this new feature in action by clicking on the following link: [https://www.youtube.com/watch?v=T--vFtyZvc4]
 +
 +
==== Alternatives ====
 +
 +
Another emulator with full OpenGL hardware support can be found here: [http://www.genymotion.com/]
 +
 +
[[Category:jPCT-AE]]

Latest revision as of 09:26, 8 April 2014

Using the emulator

The emulator is slow, buggy and just plain sucks for development. I strongly recommend to use a real device. If you absolutely have to, keep in mind that the emulator runs in "ugly but fast" mode by default. If you don't want this, you can trade image quality for speed by calling

gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);

on the gl context. But it still sucks IMHO.

Emulator and OpenGL ES 2.0

Starting with Android 4.0.3, the android emulator supports running OpenGL ES2 applications. You need to edit your Android 4.0.3+ emulator image by going down to the hardware section and adding a new property called "GPU emulation" with its value set to "true". GPU emulation can also be activated when running the emulator from the command line by running the following command:

emulator -avd "YOUR_EMULATOR_IMAGE" -gpu on

Currently the emulator reports that it doesn't support GLES 2 emulation, so if you are using something like this:

ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
ConfigurationInfo info = am.getDeviceConfigurationInfo();
boolean isGLES2supported = info.reqGlEsVersion < 0x20000;

keep in mind "isGLES2supported" will always be "false" even though the emulation is actually supported.


You can watch a video of this new feature in action by clicking on the following link: [1]

Alternatives

Another emulator with full OpenGL hardware support can be found here: [2]