Important: Please read the Qt Code of Conduct -

the api QParameter ::setValue is work well in debug mode but not well in release ,QT5.10.1?

  • why? anyone encounter this problem?

  • Lifetime Qt Champion


    Please provide a minimal compilable example that shows the behaviour.

    Also, on what platform does that happen ?

  • ok by further test, i found debug mode also have probability of happening this issue.
    this is snipset.
    //fragment shader
    #version 130
    #extension GL_ARB_gpu_shader5 : enable
    uniform highp vec3 cameraPosition;
    uniform mat3 modelViewNormal;
    uniform mat4 projectionMatrix;
    uniform mat4 inverViewMatrix;
    uniform struct LightInfo {
    vec4 position;
    vec4 direction;
    vec3 intensity;
    } light;
    uniform int modetype;
    uniform struct LineInfo {
    float width;
    vec4 color;
    } line;

    uniform vec3 ka; // Ambient reflectivity
    uniform vec3 kd; // Diffuse reflectivity
    uniform vec3 ks; // Specular reflectivity
    uniform float shininess; // Specular shininess factor
    uniform int meshtype;
    uniform float m3DObjectstatus[4] ;
    uniform uint AppCurstatus[12];
    out vec4 fragColor;
    void main()
    fragColor=(m3DObjectstatus[0] /255.0,m3DObjectstatus[1] /255.0,m3DObjectstatus[2] /255.0,1.0);
    i will capture fragColor by QRenderCapture.and the uniform "m3DObjectstatus" is initial like this
    m_3DobjectinfoParameter = new Qt3DRender::QParameter();
    m_3DobjectinfoParameter->setValue(QVariantList() << 0.0 << 0.0 << 0.0 << 0.0 << 0.0);, but when i setValue again in somewhere ,but the value is not work for fragment shader .and the value of uniform "m3DObjectstatus" keep zero.

  • test on win8.1 64bit with N card and win7 64bit with Amd card

  • Lifetime Qt Champion

    Again, please provide a complete minimal compilable example that shows the behaviour.

  • Sorry for the late reply. cos It's a little hard to isolate the
    i use the newest version QT5.11 to test.

Log in to reply