Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. the api QParameter ::setValue is work well in debug mode but not well in release ,QT5.10.1?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 880 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jimfar
    wrote on last edited by
    #1

    why? anyone encounter this problem?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please provide a minimal compilable example that shows the behaviour.

      Also, on what platform does that happen ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jimfar
        wrote on last edited by
        #3

        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);
        fragColor.a=254.0/255.0;
        }
        i will capture fragColor by QRenderCapture.and the uniform "m3DObjectstatus" is initial like this
        m_3DobjectinfoParameter = new Qt3DRender::QParameter();
        m_3DobjectinfoParameter->setName(QStringLiteral("m3DObjectstatus[0]"));
        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.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jimfar
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

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

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jimfar
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved