[PyQt] setting a uniform value
Josh Stratton
strattonbrazil at gmail.com
Sun Aug 14 21:14:20 BST 2011
I'm getting type errors sending a QMatrixr4x4 to a QGLShaderProgram.
The program was taken from a C++ version of comparable code, but I'm
assuming I need to do something more on the pyqt side to get the value
passed over correctly?
objToWorld = QMatrix4x4()
flatShader.setUniformValue("objToWorld", objToWorld)
flatShader.setUniformValue("objToWorld", objToWorld)
TypeError: arguments did not match any overloaded call:
QGLShaderProgram.setUniformValue(int, int): argument 1 has
unexpected type 'str'
QGLShaderProgram.setUniformValue(int, float): argument 1 has
unexpected type 'str'
QGLShaderProgram.setUniformValue(int, float, float): argument 1 has
unexpected type 'str'
QGLShaderProgram.setUniformValue(int, float, float, float): argument
1 has unexpected type 'str'
QGLShaderProgram.setUniformValue(int, float, float, float, float):
argument 1 has unexpected type 'str'
QGLShaderProgram.setUniformValue(int, QVector2D): argument 1 has
unexpected type 'str'
QGLShaderProgram.setUniformValue(int, QVector3D): argument 1 has
unexpected type 'str'
QGLShaderProgram.setUniformValue(int, QVector4D): argument 1 has
unexpected type 'str'
QGLShaderProgram.setUniformValue(int, QColor): argument 1 has
unexpected type 'str'
QGLShaderProgram.setUniformValue(str, QTransform): argument 2 has
unexpected type 'PyQt4.QtCore.pyqtWrapperType'
etc.
More information about the PyQt
mailing list