Missing OpenGL drivers on Android emulator - android

I am trying to set up an Android emulator to do some playing around with OpenGL ES on it, but I am stymied by the fact that, every time I run my program on it, it unceremoniously grenades itself. The problem (at least the first nasty red error line in the log) is a missing package called libhgl.so. This is the OpenGL driver file required for running OpenGL ES on Android devices, but for some reason, my emulator doesn't have it. Does anyone know where I can get drivers for the emulator, or how to get an emulator that already has them?

In this link:
http://osdir.com/ml/android-porting/2009-06/msg00282.html
it says:
libEGL.so and libGLESv2.so implements EGL and OpenGL ES through
libhgl.so and libagl.so. That is, libhgl.so and libagl.so are
dlopen()ed by libEGL.so. All EGL and OpenGL ES calls will finally call
into libhgl.so and/or libagl.so.
and here:
http://osdir.com/ml/android-porting/2009-06/msg00288.html
libagl.so is an pure software impl. For your accelerated impl., you
need to provide libhgl.so so that libEGL.so will be able to use it. It
is expected that libhgl.so implements and exports both eglXXX and glXXX
symbols.
I guess that indicates that the missing file will only exist on the device itself, but that the app should run with the software driver on the emulator. The numerous screenshots on the web of OpenGL apps on the Android emulator also indicates that OpenGL should work fine on the emulator. Any other possible reasons why you are not able to get OpenGL going?

The logic of loading EGL user space driver is at frameworks/native/opengl/libs/EGL/Loader.cpp. Basically there are three cases:
Running with emulator in software rendering mode
Running with emulator in OpenGL mode. This is where libhgl.so is loaded for earlier version of Android.
Running with actual device.
The emulator coming with ADT does not work well for case 2. But emulators are improved over recent years. You can use latest Android Studio which has a better emulator or leapdroid at http://www.leapdroid.com/

Related

SKMaps eglChooseConfig IllegalArgumentException

I have searched and searched this one and cannot seem to solve. Im running OSX 10.9 on an iMac with a ATI RADEON 4670 and and trying to get Skobbler Scouts maps to run on an Android emulator. All I keep getting is the dreaded eglChooseConfig() returning false using the inbuilt Android Emulator with all the prescribed settings set by Skobbler (gpu on API level etc etc). Is this a hardware incompatibility issue or is the Emulator just not implemented with the attribute settings set by Skobbler? Alternatively does anyone know of a working emulator for this SDK?
Any help is much appreciated. Thanks
Andy
You can find a working configuration at http://developer.skobbler.com/getting-started/android#sec031 (I've tested with device = Nexus 5 and API level 20).
Unfortunately, due to the fact that the SDK relies heavily on OpenGL most emulators will exhibit weird behaviours - leaving only real devices as good testing options (the emulator's documentation also states that OpenGL support is "tricky": "OpenGLĀ® Graphics - Emulation of OpenGL ES graphics may not perform at the same level as an actual device")

Setting up OpenGL ES 1.1, and my android environment

This may be a bit difficult, but I have a fairly complex question:
I'm fixing up an old Android phone I have from 2010 (very crap phone), to play with and experiment on. I want to write some OpenGL ES 1.1 programs (preferably in C) on it, but I have no idea how to set up my development environment.
Specifically, my question is this:
How can I set up my android device to run C code, and then link OpenGL ES 1.1 with it?
Would it be better to replace the OS (Android 2.1) with Ubuntu (or something else entirely)? I'm not sure it could run it very well, but it might simplify the process of getting the C code on it since I can just compile with GCC and run.
I've never really done something like this on a phone before (I've dabbled in the Java side of android), so any advice is appreciated.
Thanks!
You will need to setup your device to be able to deploy and debug with your system, which varies from device to device. If you've already got development in Java working on the device, then you shouldn't need to do anything additional to the setup device to develop in C/C++.
For your development machine, you will need to install at a bare-minimum the NDK. The NDK is also bundled as a package from several other sources, such as in the Tegra Android Developer's Pack, and now also Visual Studio 2015 RC. Which package you choose for development is a matter of preference.
In terms of developing for GLES 1.1, as far as I know, there are not any 'official' samples for developing for it, however, there are several tutorials around. In the NDK, you will need to #include <GLES/gl.h> to get the API. You can then take a look at Khronos' specifications on its usage.

how to enable open gl es for android avds

I am unable to get my AVD's to support HW rendering accoriding to my marmalade app, it defaults to its software renderer.
How do you check if your AVD supports HW rendering and how do you turn it on?
Also could it be my newish gpu? does your machine have to meet certain requirements before open gl es 1.1+ can be simulated?
thanks in advance!
My problem was that when I drew off the end of my surface it corrupted memory and was causing the illusion of my app not working on a GPU enabled AVD.

Android OpenGL app randomly reboots phone

I am developing an OpenGL application and testing it on Xperia 10 Mini (Android 2.1). After launching it and using it for some time the phone reboots (every time).
I have tried saving logcat to separate file, with no findings and also adb bugreport (I am not sure what to look for in that one. I found only some wlan related kernel Oops).
I am suspicious of opengl texture management or concurency. Here I am looking for any advice on how to debug the application and also for some tips on where to look for the problem.
Check your app for a memory leak. My second guess would be to check which OpenGL ES Version you are using (GL10 vs. GL20). The latter is not (fully) supported on Android 2.1 AFAIK.

Which device are supported for unity?

I am very new with unity. When I'm trying o run the project after the following the document, it does not run force close with hardware is not supported.
Simple blue screen with camera focus show at run in unity but in
device it can't.
In emulator it shows error like:
08-02 12:29:47.672: ERROR/libEGL(305): called unimplemented OpenGL ES API
In device it shows:
Insatisfylinked
What should I do? Is there some device compatibility?
Check this link for a list of devices that have been tested with Unity.
According to this post (in which the author had the same problem as you) it is possible to get Unity running on the Android emulator, but performance is very poor.
Unity CAN run on an emulator (use emulator mode when compiling) it just runs slow. On my phone (HTC legend, which is listed as incompatible), it runs slow and there's no sound, but it does work.
I think it's because for some odd reason or another, certain manufacturers didn't choose to support OpenGL on certain models.
WIndows 8 and WIndows 8 phone will be supported when released as well!

Categories

Resources