OGLES2 shader problem for Qt5/Android app on Jolla/Sailfish
-
I've tried to run my Qt5 APK on a Jolla smartphone. It will install amd run but not compile the vertex and fragment shaders.
My app uses Qt5.2.1 & OGLES2 and is compiled for Android 4.4.2.
I'm compiling the shaders from embedded strings to work around issues finding files on the system. This approach works on the Nexus 7.
My code is :
@#ifdef LCD_BUILD_ANDROID
myCode = "precision mediump int; precision mediump float; uniform sampler2D texture; varying vec2 v_texcoord; varying mediump vec4 color; void main(){ gl_FragColor = color; }";
if (!fragShd->compileSourceCode(myCode)){
QMessageBox::warning(this,QString("OpenGL Warning"),QString("Could not compile fragment shader [hardcoded]"),QMessageBox::Ok);
}
#else
if (!fragShd->compileSourceFile(myPath)){
QMessageBox::warning(this,QString("OpenGL Warning"),QString("Could not compile fragment shader ")+QString(myPath),QMessageBox::Ok);
}
#endif
@Does anyone know how I can solve this please?