PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 940 - setAttributeArray/setUniformValueArray do not take arrays
: setAttributeArray/setUniformValueArray do not take arrays
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtOpenGL
: 1.0.4
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-07-21 02:18 EEST by michael p
Modified: 2011-08-23 00:35 EEST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael p 2011-07-21 02:18:58 EEST
It is not possible to pass arrays, or python lists for that matter to
QtOpenGL.QGLShaderProgram.setAttributeArray(...) and
QtOpenGL.QGLShaderProgram.setUniformValueArray(...).
Comment 1 michael p 2011-07-21 05:52:56 EEST
here is some example code i've just written of how i would expect this to work.
but i'm not entirely sure if the gl calls are correct.


pyside.opengles.py - https://gist.github.com/7a1f2b110c4142fa9ee7
simple_opengles_wrapper.py - https://gist.github.com/d3b869dd3fbc428728d2
Comment 2 Hugo Parente Lima 2011-07-26 16:10:26 EEST
*** Bug 945 has been marked as a duplicate of this bug. ***
Comment 3 renato filho 2011-07-26 21:20:23 EEST
could you provide some example with OpenGL I do not have OpenGL ES to test
that.
Comment 4 renato filho 2011-07-27 20:24:51 EEST
We renamed some functions to optimization function call:

QtOpenGL.QGLShaderProgram.setAttributeArray2D(int, list[QVector2D], int)
QtOpenGL.QGLShaderProgram.setAttributeArray3D(int, list[QVector3D], int)
QtOpenGL.QGLShaderProgram.setAttributeArray4D(int, list[QVector4D], int)

QtOpenGL.QGLShaderProgram.setUniformValueArray2D(int, list[QVector2D], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray3D(int, list[QVector3D], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray4D(int, list[QVector4D], int)

QtOpenGL.QGLShaderProgram.setUniformValueArray2x2(int, list[QMatrix2x2], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray2x3(int, list[QMatrix2x3], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray2x4(int, list[QMatrix2x4], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray3x2(int, list[QMatrix3x2], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray3x3(int, list[QMatrix3x3], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray3x4(int, list[QMatrix3x4], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray4x2(int, list[QMatrix4x2], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray4x3(int, list[QMatrix4x3], int)
QtOpenGL.QGLShaderProgram.setUniformValueArray4x4(int, list[QMatrix4x4], int)

the same for the function with the first argument as 'char*'.

A new documentation will be released with the next release 1.0.6.

fixed on pyside commit:

commit c1ece5e4d9b1bf4b2cf91ca3b4ab1ddb616da3f3
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Tue Jul 26 15:21:40 2011 -0300
Comment 5 renato filho 2011-08-23 00:35:36 EEST
Released on PySide 1.0.6