how to enable open gl es for android avds - android

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.

Related

How can I intercept openGL function calls in Android framework?

I know I can get openGL function calls by ADB(adb shell dumpsys gfxinfo) and Android Device Monitor. But I want to get them in a lower level(framework or driver...?). What should I supposed to do?
You can use a profiler tool from the vendor of the GPU used by the phone :
Mali: Mali Graphics Debugger
Adreno: Adreno GPU Profiler or the newer SnapDragon Profiler
Nvidia: Nvidia PerfHUD
My preference goes to Adreno GPU profiler and PerfHUD, in my experience they are the most stable and they do not need to root the device.
Those tools are really usefull, you can:
view all GL commands, shaders, textures etc.
edit shaders while app is running
get interesting performance metrics (ex: finding the heaviest draw calls)
and many more things

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")

How to enable software rendering in lollipop?

I am working on an Android project where my device need to run by using software rendering.
My device architecture is ARM and I want to run lollipop using software rendering as my device dont have compatible hardware library file.
I came across that we need to set the flag USE_OPENGL_RENDERER to flase.
After setting also i am not getting the display ie getting android logo but not booting further.
What are the exact changes that i need to do in the source code to make it work with software rendering
I don't think Android supports devices without OpenGL for a while.
Android Compatibility Definition Document (CDD)
7.1.4. 2D and 3D Graphics Acceleration
Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and detailed in the Android SDK
documentations.

Where is the hardware acceleration in the ICS Emulator?

I thought this was on the way, anybody know how to enable it?
Seems that I can't get a GLES2.0 context inside the emulator either, but maybe that's just me. IllegalArgumentException: No configs match from the egl.
However, the GLES20 API Demo included seems to run.
Anyways, even so, none of it seems accelerated or fast then old emulators. Nice update though.
In Android SDK Tools R15 you can enable GPU emulation in 4.0.3 Image.
You need to create a new emulator virtual device and set GPU emulation to true in Hardware properties.
The emulator in ICS doesn't include hardware acceleration.
(The bug to provide that is still open: http://code.google.com/p/android/issues/detail?id=6816)
That said, it does allow hardware acceleration for apps when they're running on a phone. (This feature was actually introduced in Honeycomb for tablets.)
The Android SDK Add hw.gpu.enabled hardware property on August 26, 2011's commit.
"the emulator can (sort of) do emulation but you need a system image
that supports it. We haven't released any yet. If it was ready we would have announced it." said with Xavier Ducrohet On Oct 20, 2011.
Ice cream sandwich gpu emulation issue.
As of now, I can't find a system image supports it.

Missing OpenGL drivers on Android emulator

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/

Categories

Resources