2016-11-25 63 views
1

私はUbuntuホストでAndroid Virtual Deviceを実行しています。 CPU/ABI Intel Atom(x86)を使用しており、ホストGPUを使用しています。 エミュレータではKernel-based Virtual Machineが使用されています。AndroidエミュレータとOpenGL ES3:EGL_BAD_CONFIG

settings used

これが見事に限り、私は、OpenGL ES2コンテキストを使用して動作します。ハードウェアモバイルデバイス上ES3を要求

I/biplane (2839): EGL: vendor Android version 1.4 Android META-EGL 
I/biplane (2839): EGL: client apis OpenGL_ES 
I/biplane (2839): number of EGL configurations that match our preferred criteria: 1 
I/biplane (2839): R8 G8 B8 A8 DEPTH24 
E/EGL_emulation(2839): tid 2852: eglCreateContext(919): error 0x3005 (EGL_BAD_CONFIG) 

:私のアプリを使用して、しかし、OpenGLのES3コンテキストを作成しようとした場合 ...

const EGLint contextAttribs[] = { 
    EGL_CONTEXT_CLIENT_VERSION, 3, 
    EGL_NONE 
}; 
context = eglCreateContext(display, config, NULL, contextAttribs); 

は...その後、私はEGL_BAD_CONFIGエラーが出ますうまくいく。 しかし、エミュレータから要求すると失敗します。

$ glxinfo | grep ES3 
    GL_ARB_ES2_compatibility, GL_ARB_ES3_1_compatibility, 
    GL_ARB_ES3_2_compatibility, GL_ARB_ES3_compatibility, 
    GL_NV_ES3_1_compatibility, GL_NV_bindless_multi_draw_indirect, 
    GL_ARB_ES2_compatibility, GL_ARB_ES3_1_compatibility, 
    GL_ARB_ES3_2_compatibility, GL_ARB_ES3_compatibility, 
    GL_NV_ES3_1_compatibility, GL_NV_bindless_multi_draw_indirect, 

Androidの仮想デバイス上でのOpenGL ES3アプリケーションを実行する方法はあります:glxinfoから分かるように ホストマシンは、OpenGL ES3.0、ES3.1とES3.2を行うための完全に可能ですkvmのトップ?

+0

どのように設定を選択しますか?あなたはES3をサポートしていますか? –

+0

私はほとんど同じ問題を抱えていましたが、アンドロイドエミュレータがOpenGL ES3をサポートしていないことを覚えています。http://stackoverflow.com/questions/24874066/does-the-android-emulator-support-opengl-es- 3-0 –

答えて

1

エミュレータでGLES3アプリケーションを実行することは、Android Studio 3.0以降でサポートされています。

執筆時点では、このバージョンのプレビュービルドが利用できます。 参照:https://android-developers.googleblog.com/2017/05/android-studio-3-0-canary1.html

エミュレータを起動した後で、設定を変更して、次に示すようにエミュレータを再起動する必要があります。

また、Androidサンプルコードgles3jniではそうしないため、アプリがES3コンテキストを要求していることを確認してください。

enter image description here

+0

「詳細設定」タブに表示されます –

関連する問題