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 379 - QGLWidget.bindTexture is missing
: QGLWidget.bindTexture is missing
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtOpenGL
: HEAD
: All All
: P2 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-09-22 13:08 EEST by Farsmo
Modified: 2011-01-18 14:27 EET (History)
8 users (show)

See Also:


Attachments
patch (untested) (1.69 KB, patch)
2011-01-17 22:42 EET, Farsmo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Farsmo 2010-09-22 13:08:27 EEST
This causes example/opengl/textures/textures.py to fail:

Traceback (most recent call last):
  File "textures.py", line 207, in <module>
    window = Window()
  File "textures.py", line 180, in __init__
    self.glWidgets[i][j].setClearColor(clearColor)
  File "textures.py", line 88, in setClearColor
    self.updateGL()
  File "textures.py", line 100, in paintGL
    self.qglClearColor(self.clearColor)
  File "textures.py", line 110, in resizeGL
    side = min(width, height)
  File "textures.py", line 92, in initializeGL
    GLWidget.sharedObject = self.makeObject()
  File "textures.py", line 140, in makeObject
    self.bindTexture(QtGui.QPixmap(":/images/side%d.png" % (i + 1)))
AttributeError: 'GLWidget' object has no attribute 'bindTexture'
Comment 1 Marcelo Lira 2010-09-24 16:24:21 EEST
Fixed in commit PySide/17730b9a.
Comment 2 renato filho 2010-10-13 13:48:58 EEST
released on PySide 0.4.2
Comment 3 Farsmo 2010-12-02 20:00:06 EET
For me this still fails in 1.0.0beta1 (on Windows).

Note that the program does not abort because the exceptions thrown in
initializeGL() are caught by the Qt runtime.
Comment 4 Matti Airas 2010-12-03 04:26:57 EET
On Ubuntu 10.10 with beta1 (ish) build, I don't get an exception but the cubes
are white, without any textures. Wonder if it's the same issue or an unrelated
one?
Comment 5 Hugo Parente Lima 2010-12-20 18:11:06 EET
Works for me (tm)
Comment 6 Matti Airas 2010-12-21 07:45:46 EET
(In reply to comment #5)
> Works for me (tm)

On Windows?
Comment 7 Hugo Parente Lima 2010-12-21 16:19:07 EET
No, I tested on Linux x86_64 (ArchLinux)
Comment 8 Matti Airas 2010-12-22 07:45:46 EET
I believe my problems might be simply due to display driver issues (or
similar), but since the original problem still exists in Windows on beta1, the
bug is still valid.
Comment 9 Hugo Parente Lima 2010-12-22 10:36:27 EET
It was fixed in beta2, commit:

http://qt.gitorious.org/pyside/pyside/commit/c634b05def6265f8fa9ef65e17449ec7abf5e2b6
Comment 10 Matti Airas 2010-12-22 10:39:47 EET
OK! Resolving, then. Thanks!

Farsmo, if this still is broken for you, just reopen again.
Comment 11 renato filho 2011-01-06 16:19:25 EET
released on beta3
Comment 12 Farsmo 2011-01-17 20:34:44 EET
On Windows 1.0.0-beta3, only QGLWidget.bindTexture(QString) is available, so
the example still fails.

QGLWidget.bindTexture(QPixmap) is really QGLWidget.bindTexture(QPixmap, GLenum,
GLenum) because of the optional arguments, and the bindings probably choke on
GLenum.
Comment 13 Farsmo 2011-01-17 22:42:41 EET
Created attachment 222 [details]
patch (untested)

Generalized Hugo's patch to include all types we might encounter.
Comment 14 Matti Airas 2011-01-18 07:47:18 EET
Thanks, bumping priority to P2 as not to keep the patch waiting.
Comment 15 Hugo Parente Lima 2011-01-18 13:52:53 EET
The bug is about the bindTexture method and it exists on all platforms now, so
I see no reason to reopen the bug if it's fixed.

The patch could be useful for future additions on Qt that may use those OpenGL
types, but nowadays it don't add any non-binded function to PySide.
Comment 16 Matti Airas 2011-01-18 14:27:05 EET
(In reply to comment #15)
> The bug is about the bindTexture method and it exists on all platforms now, so
> I see no reason to reopen the bug if it's fixed.
> 
> The patch could be useful for future additions on Qt that may use those OpenGL
> types, but nowadays it don't add any non-binded function to PySide.

I assumed from Farsmo's comment that there'd have been some missing signatures
in QGLWidget.bindTexture. If that's not the case, the bug should indeed be
closed right away and new bug filed for the patch.

Re-resolving fixed.
Comment 17 Matti Airas 2011-01-18 14:27:17 EET
And re-closing.