android - OpenGL crashes when linking program, LG Nexus 4 -
i'm having opengl es driver error. time i'm trying compile following lines:
precision mediump float; varying highp vec2 texturecoordinate; void main() { highp vec4 color = texture2d(input0, texturecoordinate); vec3 color3 = color.rgb; vec2 tc = (2.0 * texturecoordinate) - 1.0; float d = dot(tc, tc); vec2 lookup = vec2(d, color3.r); .. .. }
but i'm getting after line:
gles20.gllinkprogram(program);
native crash : "fatal signal 11(sigdev) @ 0x00000060(code = 1), thread 1231 " i'm guessing happens because lg nexus 4 uses gpu adreno, , crashes me error code 14 on different crash - using many macros.
after compile shader, using glgetshaderiv
status of shader compilation. like:
glint compiled; glgetshaderiv(index, gl_compile_status, &compiled); //index shader value
then, if compiled returned zero, info length first, , error message follows:
glint infolen = 0; glgetshaderiv(index, gl_info_log_length, &infolen); if(infolen > 1) { char* infolog = new char(infolen); glgetshaderinfolog(index, infolen, null, infolog); }
check infolog
see error message returned shader compilation. segmentation fault message in original post not give useful solve problem.
Comments
Post a Comment