Missing OpenGL drivers on Android emulator

前端 未结 2 399
余生分开走
余生分开走 2021-01-20 00:36

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 unceremoni

相关标签:
2条回答
  • 2021-01-20 01:07

    The logic of loading EGL user space driver is at frameworks/native/opengl/libs/EGL/Loader.cpp. Basically there are three cases:

    1. Running with emulator in software rendering mode
    2. Running with emulator in OpenGL mode. This is where libhgl.so is loaded for earlier version of Android.
    3. 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/

    0 讨论(0)
  • 2021-01-20 01:16

    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?

    0 讨论(0)
提交回复
热议问题