Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-667

QOpenGLShaderProgram.setUniformValue doesn't work with 1 float

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 5.12.4
    • 5.9
    • PySide
    • 05ae61cba5f943eb58343b44f8d474bc88bf0ce4

    Description

      When calling a shader program setUniformValue with a single float value, the binding seems to convert it to int or uint and it fails to apply in the associated shaders.**

      Example:

      shader.vs
      
      uniform float param = 1.0;
      
      test.py
      
      program.setUniformValue("param", 5.0)
      

      In this situation, the value of param stays at the default (1.0) instead of being updated to 5.0.

      Another example using vectors works fine:

      shader.vs:
      
      uniform vec2 param2 = vec2(1.0, 1.0);
      
      test.py:
      
      program.setUniformValue("param2", 5.0, 6.0);
      

      In the latest case, the signature is unambiguous (only multiple floats are accepted, not uint or int) and it works.

      Looking at the generated binding, it seems that uint check is done before float check. Maybe that is the problem. How to prioritize the checks from the xml when multiple signatures are grouped in a single function?

       

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              nitrotm Antony Ducommun
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes