Details
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
- duplicates
-
PYSIDE-989 PySide2 : QOpenGLFunction
- Closed