2017-10-13 3 views
0

렌더링을 위해 GLSurfaceView을 사용하는 Android 애플리케이션이 있습니다. 이 응용 프로그램은 하나를 제외한 모든 장치에서 작동합니다 : 우리의 Zenfone 디럭스 2. 우리 GLSurfaceView 생성자에서 내가Zenfone Deluxe 2에서 setEGLConfigChooser를 사용할 때 OpenGL 앱이 충돌 함

setEGLConfigChooser(
    8, 8, 8, 8, // rgba 
    24,   // depth 
    8);   // stencil 

이 항상 다음과 같은 스택 추적 제공 충돌합니다 Zenfone 디럭스 2를 제외하고 작동을 수행

10-13 10:37:07.975 10066-10066/com.my.company.demo V/Monotype: SetAppTypeFace- try to flip, app = com.my.company.demo 
10-13 10:37:07.975 10066-10066/com.my.company.demo V/Monotype:  Typeface getFontPathFlipFont - systemFont = default#default 
10-13 10:37:08.045 10066-10066/com.my.company.demo W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 
10-13 10:37:08.065 10066-10066/com.my.company.demo V/Monotype: SetAppTypeFace- try to flip, app = com.my.company.demo 
10-13 10:37:08.065 10066-10066/com.my.company.demo V/Monotype:  Typeface getFontPathFlipFont - systemFont = default#default 
10-13 10:37:08.335 10066-10107/com.my.company.demo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 
10-13 10:37:08.405 10066-10107/com.my.company.demo I/OpenGLRenderer: Initialized EGL, version 1.4 
10-13 10:37:08.405 10066-10107/com.my.company.demo W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 
10-13 10:37:08.415 10066-10105/com.my.company.demo E/AndroidRuntime: FATAL EXCEPTION: GLThread 1298 
    Process: com.my.company.demo, PID: 10066 
    java.lang.RuntimeException: createContext failed: EGL_BAD_CONFIG 
     at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1196) 
     at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1187) 
     at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1037) 
     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1404) 
     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1243) 

그럼 간단히 setEGLConfigChooser에 대한 호출의 주석을 제거한 다음 응용 프로그램이 정상적으로 실행됩니다. OpenGL은 RGBA의 경우 (8, 8, 8, 0), 깊이 버퍼의 경우 24, 스텐실 버퍼의 경우 8을 제공합니다. 좋아, 그럼 그 대신에 setEGLConfigChooser에서 이러한 값을 설정하지만, 그 다음 앱은 여전히 ​​동일한 출력으로 중단됩니다.

나는 이것을 어떻게 만들거나 어떻게 해결해야할지 모르겠다. documentationsetEGLConfigChooser에 대한 국가

적어도 지정된 depthSize 및 stencilSize, 정확히 지정된 redSize, greenSize, blueSize 및 alphaSize으로 설정을 선택하는 설정 선택기를 설치합니다.

이 메서드를 호출하면 setRenderer (Renderer)가 호출되기 전에이 메서드를 호출해야합니다.

setEGLConfigChooser 메서드가 호출되지 않으면 기본적으로 뷰는 깊이 버퍼 깊이가 16 비트 이상인 RGB_888 표면을 선택합니다.

이 문제는별로 도움이되지 않습니다. 문제는 무엇이 될 수 있습니까? 모든 기기를 타겟팅하는보다 일반적인 방법으로 setEGLConfigChooser으로 전화를 드리고 싶습니다.

더 많은 장치 정보 :

Zenfone 디럭스 2는 파워 VR 악성 G6430 GPU를 사용하여 x86 장치입니다. 가능한 최신 소프트웨어 업데이트를 다운로드하여 설치했습니다.

  • gl10.glGetString(GL10.GL_VENDOR);"Imagination Technologies"
  • gl10.glGetString(GL10.GL_RENDERER); 제공 "PowerVR Rogue G6430"
  • gl10.glGetString(GL10.GL_VERSION);"OpenGL ES 3.1 build [email protected]"
  • gl10.glGetString(GL10.GL_EXTENSIONS);이 Y이면

    GL_EXT_debug_marker 
    GL_EXT_blend_minmax 
    GL_EXT_color_buffer_float 
    GL_EXT_copy_image 
    GL_EXT_discard_framebuffer 
    GL_EXT_draw_buffers 
    GL_EXT_draw_buffers_indexed 
    GL_EXT_geometry_shader 
    GL_EXT_geometry_point_size 
    GL_EXT_gpu_shader5 
    GL_EXT_multi_draw_arrays 
    GL_EXT_multisampled_render_to_texture 
    GL_EXT_occlusion_query_boolean 
    GL_EXT_primitive_bounding_box 
    GL_EXT_pvrtc_sRGB 
    GL_EXT_read_format_bgra 
    GL_EXT_robustness 
    GL_EXT_separate_shader_objects 
    GL_EXT_shader_framebuffer_fetch 
    GL_EXT_shader_io_blocks 
    GL_EXT_shader_pixel_local_storage 
    GL_EXT_shader_texture_lod 
    GL_EXT_shadow_samplers 
    GL_EXT_tessellation_shader 
    GL_EXT_tessellation_point_size 
    GL_EXT_texture_border_clamp 
    GL_EXT_texture_buffer 
    GL_EXT_texture_cube_map_array 
    GL_EXT_texture_filter_anisotropic 
    GL_EXT_texture_format_BGRA8888 
    GL_EXT_texture_rg 
    GL_EXT_texture_sRGB_decode 
    GL_IMG_multisampled_render_to_texture 
    GL_IMG_program_binary 
    GL_IMG_read_format 
    GL_IMG_shader_binary 
    GL_IMG_texture_compression_pvrtc 
    GL_IMG_texture_compression_pvrtc2 
    GL_IMG_texture_format_BGRA8888 
    GL_IMG_texture_npot 
    GL_KHR_blend_equation_advanced 
    GL_KHR_blend_equation_advanced_coherent 
    GL_KHR_debug 
    GL_OES_compressed_ETC1_RGB8_texture 
    GL_OES_depth24 
    GL_OES_depth_texture 
    GL_OES_EGL_image 
    GL_OES_EGL_image_external 
    GL_OES_EGL_image_external_essl3 
    GL_OES_EGL_sync 
    GL_OES_element_index_uint 
    GL_OES_fragment_precision_high 
    GL_OES_draw_buffers_indexed 
    GL_OES_get_program_binary 
    GL_OES_mapbuffer 
    GL_OES_packed_depth_stencil 
    GL_OES_required_internalformat 
    GL_OES_rgb8_rgba8 
    GL_OES_sample_shading 
    GL_OES_sample_variables 
    GL_OES_shader_image_atomic 
    GL_OES_shader_multisample_interpolation 
    GL_OES_standard_derivatives 
    GL_OES_surfaceless_context 
    GL_OES_texture_float 
    GL_OES_texture_half_float 
    GL_OES_texture_npot 
    GL_OES_texture_stencil8 
    GL_OES_texture_storage_multisample_2d_array 
    GL_OES_vertex_array_object 
    GL_OES_vertex_half_float 
    

답변

0

내가 고장난 이유는 setEGLConfigChooser()setEGLContextClientVersion() 앞에 넣기 때문입니다. 이후에 통화를 이동하면 충돌이 제거되고 다른 장치에서 계속 작동합니다. 왜 충돌하는지에 대한 자세한 정보는 this 답변에서 찾을 수 있습니다.

0

제공 준다 준다 좋은 오래된 MultisampleConfigChooser을 보면 깊이는 16 비트이고 스텐실은 1뿐입니다. 또한 EGL 1.4 specification을 통해 순환 한 후 최소 지원 스텐실, 깊이 및 색상 버퍼 크기에 관한 설명을 찾지 못했습니다.

더 낮은 숫자로 시도해 볼 수 있지만 사용 가능한 가장 적합한 숫자를 선택하려는 경우 더 복잡하게 만들 필요가 있습니다.

+0

내 문제는 어떤 값을 선택해야하는지에 관한 것이 아니라 하나의 특정 장치에 대해'setEGLConfigChooser'에서 충돌하는 것입니다. 다른 모든 장치는 호출 할 때 작동합니다. 또한'setEGLConfigChooser'를 호출하지 않을 때 장치가 제공하는 것과 똑같은 설정을 사용할 때 충돌이 발생합니다. –

+0

EGL_BAD_CONFIG는 전달한 구성이 올바르지 않아 충돌이 발생한 것을 분명히 의미합니다. 따라서 당신이 선택할 수있는 가치에주의를 기울여야 함을 의미합니다. – andras

관련 문제