This does not appear to be fixed, sadly. I've re-opened the issue here if anyone feels like taking another crack at it....
https://github.com/pyqtgraph/pyqtgraph/issues/2618 On Tuesday, October 14, 2014 at 10:51:48 PM UTC-3 [email protected] wrote: > This issue should now be fixed in the develop branch thanks to John's PR. > If there are any lingering problems, please let us know! > > > On Fri, Sep 26, 2014 at 11:01 AM, John David Reaver <[email protected]> > wrote: > >> Something else: the GLViewWidget.ShareWidget is being created twice. It >> isn't being shared by the two GLViewWidgets! See the following line in the >> source code: >> >> >> https://github.com/pyqtgraph/pyqtgraph/blob/develop/pyqtgraph/opengl/GLViewWidget.py#L22 >> >> In *PySide*, the line inside the if statement runs, but then immediately >> after the if statement, ShareWidget is still None. In *PyQt4*, the >> statement works as expected. I made ShareWidget a module-level variable >> instead of a static property of GLViewWidget, and then it worked in PySide! >> >> I am wondering why you can't assign a class attribute to GLViewWidget in >> PySide, but you can in PyQt4. Is there some funny Python metaclass or class >> hierarchy activity happening in PySide that erases the static ShareWidget >> variable? >> >> Also, Luke, do you think it would be acceptable to make ShareWidget a >> module-level declaration so this issue is fixed? If so, I can make a pull >> request. >> > >> On Fri, Sep 26, 2014 at 7:52 AM, John David Reaver <[email protected]> >> wrote: >> >>> In my application, I have 10 3D plots, but only two of me are giving me >>> the error. Furthermore, this only started happening about 2 weeks ago, so >>> some innocuous change I made introduced the bug. >>> >>> My other 8 plots are created on demand (not when the GUI starts) have >>> GLScatterPlotItems in them, but they give me no trouble. After digging >>> though the pyqtgraph source code, I uncovered lots of talk of sharing >>> shaders. I decided to call QtOpenGL.QGLWidget.isSharing() on all of my >>> plots. My 8 plots that work return isSharing() == True, and the two giving >>> me trouble (like the example script I posted) have isSharing() == False. >>> >>> Now here's the kicker. Here is a modified version of the script that >>> prints isSharing() at key points: >>> >>> import numpy as np >>> from PyQt4 import QtGui, QtOpenGL >>> import sys >>> >>> import pyqtgraph.opengl as gl >>> >>> app = QtGui.QApplication.instance() >>> if not app: >>> app = QtGui.QApplication(sys.argv) >>> >>> v1 = gl.GLViewWidget() >>> v1.show() >>> v2 = gl.GLViewWidget() >>> v2.show() >>> >>> print("Sharing:", QtOpenGL.QGLContext.areSharing(v1.context(), >>> v2.context())) >>> >>> v1.addItem(gl.GLScatterPlotItem(pos=np.array([[1, 1, 1]]))) >>> v2.addItem(gl.GLScatterPlotItem(pos=np.array([[1, 1, 1]]))) >>> >>> sys.exit(app.exec_()) >>> >>> >>> >>> When I run this with *PySide*, it prints "Sharing: False", then the >>> errors discussed earlier. When I run it with *PyQt4*, it prints >>> "Sharing: True" and works! It seems to me that context sharing is required >>> for the GLScatterPlotItem shader, but for some reason, PySide doesn't use >>> it in some instances. I wonder why PyQt always uses context sharing, and >>> why some plots in my application use it in PySide. >>> >>> I am doing more investigation as to why this is happening. However, >>> given this information, does anyone have a clue as to how I can force >>> context sharing in PySide? Also, I know pyqtgaph passes a static >>> shareWidget. Is it the case that this sometimes works, and sometimes >>> doesn't? >>> >>> If anyone has any more ideas, I would love them! >>> >>> On Thu, Sep 25, 2014 at 7:03 AM, Luke Campagnola <[email protected]> >>> wrote: >>> >>>> On Thu, Sep 18, 2014 at 2:31 PM, John David Reaver <[email protected]> >>>> wrote: >>>> >>>>> Actually, I spoke to early. Using PySide 1.2.2 doesn't in fact fix the >>>>> problem :( >>>>> >>>>> At least it is nailed down to a difference between PySide and PyQt >>>>> haha. >>>>> >>>> >>>> Thanks for investigating! This is very helpful. >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "pyqtgraph" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/pyqtgraph/AOj_oRoN_fk/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/pyqtgraph/CACZXET-avzro3QT4wcKixnJWihH3fE5JoFfFor6aGUKsAziw-w%40mail.gmail.com >>>> >>>> <https://groups.google.com/d/msgid/pyqtgraph/CACZXET-avzro3QT4wcKixnJWihH3fE5JoFfFor6aGUKsAziw-w%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> -- >> > You received this message because you are subscribed to the Google Groups >> "pyqtgraph" group. >> > To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pyqtgraph/CAOWTBbxcAmoha%2BUnCb1BuDkM%3D%2BWPpgd5hiDW%2BLwh%3DBwLivWV%2Bw%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/pyqtgraph/CAOWTBbxcAmoha%2BUnCb1BuDkM%3D%2BWPpgd5hiDW%2BLwh%3DBwLivWV%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . > > >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/16c71c38-b28d-4b59-88a7-4df11f4f9b56n%40googlegroups.com.
