pythoneer / AndroidGLPostprocessingView

2 stars 2 forks source link

ShaderHelper: Error compiling shader: 0:4: P0001: Extension directive #1

Open chongbo2013 opened 8 years ago

chongbo2013 commented 8 years ago

03-26 14:25:31.063 21318-21417/lordnaikon.de.glpostprocessingview E/MPlugin: Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport 03-26 14:25:31.206 21318-21409/lordnaikon.de.glpostprocessingview E/MALI: _essl_run_frontend:218: [MALI] Parse translation unit failed (2, 0) 03-26 14:25:31.227 21318-21409/lordnaikon.de.glpostprocessingview E/MALI: _essl_run_compiler_part_1:558: [MALI] _essl_run_frontend failed 03-26 14:25:31.244 21318-21409/lordnaikon.de.glpostprocessingview E/ShaderHelper: Error compiling shader: 0:4: P0001: Extension directive must occur before any non-preprocessor tokens 0:5: L0001: Typename expected, found 'samplerExternalOES' 03-26 14:25:31.248 21318-21409/lordnaikon.de.glpostprocessingview E/AndroidRuntime: FATAL EXCEPTION: GLThread 40704 Process: lordnaikon.de.glpostprocessingview, PID: 21318 java.lang.RuntimeException: Error creating shader. at de.pythoneer.postprocessing.ShaderHelper.compileShader(ShaderHelper.java:44) at de.pythoneer.postprocessing.FooRenderer.onSurfaceCreated(FooRenderer.java:109) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1548) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1286)

pythoneer commented 8 years ago

Thx for filing this issue. Unfortunately i am not very active at this project but i'll try to look into that. Looks like some issue with the Mali OpenGL ES implementation – i've a suspicion if you really want it to run pls try to switch the occurrence of the "#extension GL_OES_EGL_image_external : require" in the shader you need to to the first position (or second etc.) of the shader file like /app/src/main/res/raw/crt_one_fragment_shader.glsl

i suspect the shader implementation of the mali OpenGL is expecting it to be elsewhere.