Reputation: 97
Hello and sorry for my english.
I'm developing an Android app with openGLES2.0 on Eclipse Luna Ide, and the OpenGL ES extension "GL_OES_element_index_uint" doesn't work in the Android emulator. It crashes when trying to call "glDrawElements" with "UNSIGNED_INT" type and shows the next two error messages.
E/emuglGLESv2_enc(764): unsupported index buffer type 5125
E/eglCodecCommon(764): **** ERROR unknown type 0x1405 (glSizeof,72)
When I request the OpenGL extensions with a call to "glGetString(GL_EXTENSIONS)" it tells me that the extension GL_OES_element_index_uint is supported.
I've made a call to "glEnable(GL_EXTENSIONS)" in the renderer class in order to activate the GL extensions.
And I've also put the next directive in both shaders (vertex and fragment), in order to activate the extension in the shaders too: #extension GL_OES_element_index_uint : enable
and the result of compiling the shaders says that this feature is not supported, as you can see in the log lines I've post down here.
I don't know if I'm doing anything wrong or the emulator's crash is due to incompatibilities with the openGLES extensions and the Android emulator
Thank you for your help.
Here is an extract of my log.
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bc640 android.hardware.location.network fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bc6d0 android.hardware.location fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bc750 android.software.input_methods fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bc7d8 android.hardware.touchscreen.multitouch.jazzhand fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bc880 android.hardware.touchscreen.multitouch fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bc918 android.hardware.screen.landscape fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bc9a8 android.hardware.screen.portrait fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bca30 android.hardware.sensor.compass fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcab8 android.hardware.faketouch fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcb38 android.hardware.camera fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcbb0 android.hardware.camera.any fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcc30 android.hardware.bluetooth fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bccb0 android.hardware.touchscreen.multitouch.distinct fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcd58 android.software.home_screen fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcdd8 android.hardware.microphone fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bce58 android.hardware.camera.autofocus fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcee8 android.hardware.sensor.accelerometer fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bcf80 android.software.live_wallpaper fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bd008 android.hardware.touchscreen fl=0x0}
05-24 12:59:54.278: I/System.out(2203): AEP: FeatureInfo{b31bd088 android.software.app_widgets fl=0x0}
05-24 12:59:54.298: I/System.out(2203): AEP: FeatureInfo{b31bd108 glEsVers=2.0 fl=0x0}
05-24 12:59:54.308: I/System.out(2203): repetOnResume: 0
05-24 12:59:54.358: D/libEGL(2203): loaded /system/lib/egl /libEGL_emulation.so
05-24 12:59:54.358: D/(2203): HostConnection::get() New Host Connection established 0xb7abdd10, tid 2203
05-24 12:59:54.408: D/libEGL(2203): loaded /system/lib/egl/libGLESv1_CM_emulation.so
05-24 12:59:54.408: D/libEGL(2203): loaded /system/lib/egl/libGLESv2_emulation.so
05-24 12:59:54.448: W/EGL_emulation(2203): eglSurfaceAttrib not implemented
05-24 12:59:54.448: D/OpenGLRenderer(2203): Enabling debug mode 0
05-24 12:59:54.448: D/(2203): HostConnection::get() New Host Connection established 0xb7ac3850, tid 2217
05-24 12:59:54.498: I/System.out(2203): GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_vertex_half_float GL_OES_texture_npot GL_OES_rgb8_rgba8
05-24 12:59:54.518: V/ShaderHelper(2203): Results of compiling source:
05-24 12:59:54.518: V/ShaderHelper(2203): uniform mat4 u_Matrix;
05-24 12:59:54.518: V/ShaderHelper(2203): attribute vec4 a_Position;
05-24 12:59:54.518: V/ShaderHelper(2203): attribute vec2 a_TextureCoordinates;
05-24 12:59:54.518: V/ShaderHelper(2203): varying vec2 v_TextureCoordinates;
05-24 12:59:54.518: V/ShaderHelper(2203): void main()
05-24 12:59:54.518: V/ShaderHelper(2203): {
05-24 12:59:54.518: V/ShaderHelper(2203): v_TextureCoordinates = a_TextureCoordinates;
05-24 12:59:54.518: V/ShaderHelper(2203): gl_Position = u_Matrix * a_Position;
05-24 12:59:54.518: V/ShaderHelper(2203): }
05-24 12:59:54.518: V/ShaderHelper(2203): :
05-24 12:59:54.518: V/ShaderHelper(2203): Results of compiling source:
05-24 12:59:54.518: V/ShaderHelper(2203): #ifdef GL_FRAGMENT_PRECISION_HIGH
05-24 12:59:54.518: V/ShaderHelper(2203): precision highp float;
05-24 12:59:54.518: V/ShaderHelper(2203): #else
05-24 12:59:54.518: V/ShaderHelper(2203): precision mediump float;
05-24 12:59:54.518: V/ShaderHelper(2203): #endif
05-24 12:59:54.518: V/ShaderHelper(2203): //precision mediump float;
05-24 12:59:54.518: V/ShaderHelper(2203): uniform sampler2D u_TextureUnit;
05-24 12:59:54.518: V/ShaderHelper(2203): varying vec2 v_TextureCoordinates;
05-24 12:59:54.518: V/ShaderHelper(2203): void main()
05-24 12:59:54.518: V/ShaderHelper(2203): {
05-24 12:59:54.518: V/ShaderHelper(2203): gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);
05-24 12:59:54.518: V/ShaderHelper(2203): }
05-24 12:59:54.518: V/ShaderHelper(2203): :
05-24 12:59:54.558: V/ShaderHelper(2203): Results of linking program:
05-24 12:59:54.558: V/ShaderHelper(2203): Results of validating program: 1
05-24 12:59:54.558: V/ShaderHelper(2203): Log:
05-24 12:59:54.558: V/ShaderHelper(2203): Results of compiling source:
05-24 12:59:54.558: V/ShaderHelper(2203): #version 150
05-24 12:59:54.558: V/ShaderHelper(2203): #extension GL_OES_element_index_uint : enable
05-24 12:59:54.558: V/ShaderHelper(2203): uniform mat4 u_Matrix;
05-24 12:59:54.558: V/ShaderHelper(2203): attribute vec4 a_Position;
05-24 12:59:54.558: V/ShaderHelper(2203): void main()
05-24 12:59:54.558: V/ShaderHelper(2203): {
05-24 12:59:54.558: V/ShaderHelper(2203): gl_Position = u_Matrix * a_Position;
05-24 12:59:54.558: V/ShaderHelper(2203):
05-24 12:59:54.558: V/ShaderHelper(2203): }
05-24 12:59:54.558: V/ShaderHelper(2203): :WARNING: 0:2: '#extension' : 'GL_OES_element_index_uint' is not supported
05-24 12:59:54.558: V/ShaderHelper(2203): Results of compiling source:
05-24 12:59:54.558: V/ShaderHelper(2203): #version 150
05-24 12:59:54.558: V/ShaderHelper(2203): #extension GL_OES_element_index_uint : enable
05-24 12:59:54.558: V/ShaderHelper(2203): #ifdef GL_FRAGMENT_PRECISION_HIGH
05-24 12:59:54.558: V/ShaderHelper(2203): precision highp float;
05-24 12:59:54.558: V/ShaderHelper(2203): #else
05-24 12:59:54.558: V/ShaderHelper(2203): precision mediump float;
05-24 12:59:54.558: V/ShaderHelper(2203): #endif
05-24 12:59:54.558: V/ShaderHelper(2203): //precision mediump float;
05-24 12:59:54.558: V/ShaderHelper(2203): uniform vec4 u_Color;
05-24 12:59:54.558: V/ShaderHelper(2203): void main()
05-24 12:59:54.558: V/ShaderHelper(2203): {
05-24 12:59:54.558: V/ShaderHelper(2203): gl_FragColor = u_Color;
05-24 12:59:54.558: V/ShaderHelper(2203): }
05-24 12:59:54.558: V/ShaderHelper(2203): :WARNING: 0:2: '#extension' : 'GL_OES_element_index_uint' is not supported
05-24 12:59:54.578: V/ShaderHelper(2203): Results of linking program:
05-24 12:59:54.578: V/ShaderHelper(2203): Results of validating program: 1
05-24 12:59:54.578: V/ShaderHelper(2203): Log:
Upvotes: 2
Views: 1182
Reputation: 97
Finally I got the app runnig on a real device. I think that the problem was that the "GL_OES_element_index_uint" extension isn't implemented in the PC's GPU, so the emulator can't translate that extension to the HOST GPU.
It seems that the emulator is useless if you are trying to use openGL ES extensions (OES_extensions) in the host GPU, because PC's GPU can't understand those extensions.
Upvotes: 4