本文介绍了Android 模拟器上缺少 OpenGL 驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个 Android 模拟器来在其上使用 OpenGL ES 进行一些操作,但我被这样一个事实所阻碍,即每次我在其上运行我的程序时,它都会毫不客气地自爆.问题(至少是日志中第一个讨厌的红色错误行)是一个名为 libhgl.so 的包丢失.这是在 Android 设备上运行 OpenGL ES 所需的 OpenGL 驱动程序文件,但由于某种原因,我的模拟器没有它.有谁知道我在哪里可以获得模拟器的驱动程序,或者如何获得已经拥有它们的模拟器?

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?

推荐答案

在这个链接中:

http://osdir.com/ml/android-porting/2009-06/msg00282.html

上面写着:

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.

这里:

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.

我猜这表明丢失的文件将仅存在于设备本身上,但应用程序应与模拟器上的软件驱动程序一起运行.Android 模拟器上的 OpenGL 应用程序网络上的大量屏幕截图也表明 OpenGL 在模拟器上应该可以正常工作.您无法启动 OpenGL 的任何其他可能原因?

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?

这篇关于Android 模拟器上缺少 OpenGL 驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 15:54