Donnerstag, 3. Januar 2013

Android Emulator and OpenGL ES 2.0

In the last time I often read that developing with OpenGL ES under Android works only with real devices. Emulators don't support OpenGL. I will prove, that this is no longer right and show a device setup, that allows debugging and emulating OpenGL ES 2.0 with Android.

- At first the computer internal graphic card needs to support OpenGL, which most of the devices should.

- Then of course the Android SDK must be installed. I am working actually with Android SDK Revision 21 and the Platform Tools 16. Later versions should do fine.

- I tested with API Level 15 (Android 4.0.3). At first you have to use Android SDK Manager and install the Intel x86 Atom System Image.  (again, later versions should do fine).

- Next step I used the Android Virtual Device Manager to create a new Device Definition with following values:

* Screen Size: 4.0
* Resolution 480 x 800
* Sensors: Accelerometer, Gyroscope, GPS, Proximity Sensor
* Cameras: Rear
* Input: No nav
* RAM: 30 MiB
* Size: normal
* Screen Ratio: long
* Density: hdpi
* Buttons: Software
* Portrait and Landscape enabled

- Then you have to create a Android Virtual Device
* Device: see above, the actually created
* Target: Android 4.0.3 - API Level 15
* CPU/ABI: Intel Atom (x86). This value cannot be set and will be available after restarting Eclipse.
* Memory Options: 512 MB
* VM Heap: 48
* Internal Storage: 100
* Emulation Options: Use Host GPU (Important!)

Save the device now and start with testing. Have fun.