I was wondering if there is a way to clear the 3d graphics view like the plot option. I was wondering if there is either a reset for the entire gl view, or if there is a way to clear a specific item. My goal is to have a grid drawn, then place some object, then be able to remove the object without changing the grid.
--
-- [ You are subscribed to pyqt...@googlegroups.com. To unsubscribe, send email to pyqtgraph+...@googlegroups.com ]
---
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 pyqtgraph+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
|==============================>>
| Traceback (most recent call last):
| File "C:/Python26/Lib/site-packages/pyqtgraph\opengl\GLViewWidget.py", line 115, in drawItemTree
| i.paint()
| File "C:/Python26/Lib/site-packages/pyqtgraph\opengl\items\GLScatterPlotItem.py", line 101, in paint
| glEnable(GL_POINT_SPRITE)
| File "errorchecker.pyx", line 50, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src\errorchecker.c:854)
| GLError: GLError(
| err = 1280,
| description = 'invalid enumerant',
| baseOperation = glEnable,
| cArguments = (GL_POINT_SPRITE,)
| )
|
|==============================<<
Error while drawing item <pyqtgraph.opengl.items.GLScatterPlotItem.GLScatterPlotItem object at 0x40619C90>. The original exception is printed above; however, pyqtgraph requires OpenGL version 2.0 or greater for many of its 3D features and your OpenGL version is 1.1.0. Installing updated display drivers may resolve this issue.
Do you know if this is actually an OpenGL version problem or is something else wrong
Thanks!
sorry this is the error:|==============================>>
| Traceback (most recent call last):
| File "C:/Python26/Lib/site-packages/pyqtgraph\opengl\GLViewWidget.py", line 115, in drawItemTree
| i.paint()
| File "C:/Python26/Lib/site-packages/pyqtgraph\opengl\items\GLScatterPlotItem.py", line 101, in paint
| glEnable(GL_POINT_SPRITE)
| File "errorchecker.pyx", line 50, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src\errorchecker.c:854)
| GLError: GLError(
| err = 1280,
| description = 'invalid enumerant',
| baseOperation = glEnable,
| cArguments = (GL_POINT_SPRITE,)
| )
|
|==============================<<
Error while drawing item <pyqtgraph.opengl.items.GLScatterPlotItem.GLScatterPlotItem object at 0x40619C90>. The original exception is printed above; however, pyqtgraph requires OpenGL version 2.0 or greater for many of its 3D features and your OpenGL version is 1.1.0. Installing updated display drivers may resolve this issue.
Do you know if this is actually an OpenGL version problem or is something else wrong
--
Hi Luke,I have tested this on two computers, one with i3 integrated graphics, the other with i7 geforce gt 630M, the latter has opengl 4.2. I attached an example file, its your scatter plot example and i added on line 80filename2 = 'ScreenGrab2'myfile2 = str(filename2)+str('1')+str('.jpg')w.renderPixmap(1000,1000).save(myfile2)Do you see anything wrong with this or do you not get the error?
--
d = w.renderToArray((1000, 1000))pg.makeQImage(d).save(filename)
Thanks luke, where is makeQImage?
Hi Luke, When trying to render large images, 5k or 10k, I get memory errors. Im pretty sure i have enough RAM, which is never above half when running the program, and my graphics card has 2 gigs RAM. Do you have the same problem with large images?
--
The update is able to do 10k images but the textures are not aligning well for me.
I am also only able to save an image once, then the memory issue comes up again:Traceback (most recent call last):File "D:\MoAnProg\MoAnWin.py", line 1557, in Save3DCalld = globalMoAnWindow.openglwidget.renderToArray((int(arg[1]),int(arg[2])))File "C:\Python27\lib\site-packages\pyqtgraph\opengl\GLViewWidget.py", line 355, in renderToArrayoutput = np.empty((w, h, 4), dtype=np.ubyte)MemoryError
--
Do you know of anything I should be aware of reverting to 4.9, if it fixes the problem then I have no problem reverting, at least for this rendering. Is my thoughts on allocating memory totally off base for python?
--
The 10k image is a single plot, no animation. The second image is part of an animation sequence which recreates the entire view each time with a new color, so if it was updating in between it would go from red to blue.So after the revert to 4.9 the only memory issue i run into is with larger than 10k, like 15k still gives me memory issues but maybe expecting that is out of reach for now anyway. The alignment of the subtextures does seem to still be a problem, are you not able to see that? The code is so intermixed with a larger program but if you are not able to see the same thing i will try to recreate the situation
--