View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#2007
In the meantime, one of the smaller things I've been looking into is the nice animated speed gauge mosen has recently created. It should look like this:


Unfortunately something is apparently wrong with the shaders used for it, as I just get a violet rectangle and a bunch of errors in the log:

Code:
ERROR: 0:11: 'atan2' : no matching overloaded function found 
ERROR: 1 compilation errors.  No code generated.

[W] unknown:0 - QOpenGLShader::compile(Fragment): ERROR: 0:11: 'atan2' : no matching overloaded function found 
ERROR: 1 compilation errors.  No code generated.


[W] unknown:0 - *** Problematic Fragment shader source code ***
[W] unknown:0 - #ifndef GL_FRAGMENT_PRECISION_HIGH
#define highp mediump
#endif
#line 1

      uniform lowp float qt_Opacity;
      uniform highp float angleBase;
      uniform highp float angle;
      varying highp vec2 coord;
      void main() {
        gl_FragColor = vec4(0.0,0.0,0.0,0.0);
        highp vec2 d=2.0*coord-vec2(1.0,1.0);
        highp float r=length(d);
        if (0.66<=r && r<=0.92) {
          highp float a=atan2(d.x,-d.y);
          if (angleBase<=a && a<=angle) {
            highp float p=(a-angleBase)/(angle-angleBase);
            gl_FragColor = vec4(0.9,0.2,0.1,p) * qt_Opacity;
          }
        }
      }
[W] unknown:0 - ***
[W] unknown:0 - QQuickCustomMaterialShader: Shader compilation failed:
[W] unknown:0 - "ERROR: 0:11: 'atan2' : no matching overloaded function found \nERROR: 1 compilation errors.  No code generated.\n\n"
Apparently the shaders fail to compile for whatever reason. I'm seeing the same thing happen both on Sailfish OS (2.2) and one my Fedora desktop system (Fedora 28 with Qt 5.10). Any ideas how to fix it ?
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 5 Users Say Thank You to MartinK For This Useful Post: