All other examples work but none of the 3D examples, which looks like an OpenGL issue. Trying to narrow down the problem I ran only the first example of the provided 3D Graphics/Scatter Plot example ("First example is a set of points with pxMode=False") and the preceeding code as well of course. This in a Jupyter notebook on a Raspberry Pi 3.
---------------------------------------------------------------------------
GLError Traceback (most recent call last)
/home/pi/.local/lib/python3.7/site-packages/pyqtgraph/opengl/GLViewWidget.py in addItem(self, item)
59 try:
---> 60 item.initializeGL()
61 except:
/home/pi/.local/lib/python3.7/site-packages/pyqtgraph/opengl/items/GLScatterPlotItem.py in initializeGL(self)
74 glActiveTexture(GL_TEXTURE0)
---> 75 glEnable(GL_TEXTURE_2D)
76 glBindTexture(GL_TEXTURE_2D, self.pointTexture)
/home/pi/.local/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py in __call__(self, *args, **named)
414 if self.load():
--> 415 return self( *args, **named )
416 else:
/home/pi/.local/lib/python3.7/site-packages/OpenGL/error.py in glCheckError(self, result, baseOperation, cArguments, *args)
233 cArguments = cArguments,
--> 234 baseOperation = baseOperation,
235 )
GLError: GLError(
err = 1280,
description = b'invalid enumerant',
baseOperation = glEnable,
cArguments = (GL_TEXTURE_2D,)
)
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-2-591eade3bea2> in <module>()
44 sp1 = gl.GLScatterPlotItem(pos=pos, size=size, color=color, pxMode=False)
45 sp1.translate(5,5,0)
---> 46 w.addItem(sp1)
/home/pi/.local/lib/python3.7/site-packages/pyqtgraph/opengl/GLViewWidget.py in addItem(self, item)
60 item.initializeGL()
61 except:
---> 62 self.checkOpenGLVersion('Error while adding item %s to GLViewWidget.' % str(item))
63
64 item._setView(self)
/home/pi/.local/lib/python3.7/site-packages/pyqtgraph/opengl/GLViewWidget.py in checkOpenGLVersion(self, msg)
428 ## Only to be called from within exception handler.
429 ver = glGetString(GL_VERSION).split()[0]
--> 430 if int(ver.split(b'.')[0]) < 2:
431 from .. import debug
432 debug.printExc()
ValueError: invalid literal for int() with base 10: b'OpenGL'
--------------------------------------------
In the hope that it helps, the output of
import pyqtgraph as pg
pg.systemInfo()
import pyqtgraph.opengl.glInfo
is:
sys.platform: linux
sys.version: 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0]
qt bindings: PyQt5 5.11.3 Qt 5.11.3
pyqtgraph: 0.11.0; None
config:
{'antialias': False,
'background': 'k',
'crashWarning': False,
'editorCommand': None,
'enableExperimental': False,
'exitCleanup': True,
'foreground': 'd',
'imageAxisOrder': 'col-major',
'leftButtonPan': True,
'useOpenGL': False,
'useWeave': False,
'weaveDebug': False}
GL version:OpenGL ES 3.1 Mesa 19.3.2
MAX_TEXTURE_SIZE: 8192
MAX_3D_TEXTURE_SIZE: 2048
Extensions: GL_EXT_blend_minmax
GL_EXT_multi_draw_arrays
GL_EXT_texture_compression_s3tc
GL_EXT_texture_compression_dxt1
GL_EXT_texture_compression_rgtc
GL_EXT_texture_format_BGRA8888
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_depth24
GL_OES_element_index_uint
GL_OES_fbo_render_mipmap
GL_OES_mapbuffer
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_stencil8
GL_OES_texture_3D
GL_OES_texture_float
GL_OES_texture_float_linear
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_vertex_half_float
GL_EXT_texture_sRGB_decode
GL_OES_EGL_image
GL_OES_depth_texture
GL_OES_packed_depth_stencil
GL_EXT_texture_type_2_10_10_10_REV
GL_NV_conditional_render
GL_OES_get_program_binary
GL_APPLE_texture_max_level
GL_EXT_discard_framebuffer
GL_EXT_read_format_bgra
GL_EXT_frag_depth
GL_NV_fbo_color_attachments
GL_OES_EGL_image_external
GL_OES_EGL_sync
GL_OES_vertex_array_object
GL_ANGLE_texture_compression_dxt3
GL_ANGLE_texture_compression_dxt5
GL_EXT_occlusion_query_boolean
GL_EXT_texture_rg
GL_EXT_unpack_subimage
GL_NV_draw_buffers
GL_NV_read_buffer
GL_NV_read_depth
GL_NV_read_depth_stencil
GL_NV_read_stencil
GL_EXT_draw_buffers
GL_EXT_map_buffer_range
GL_KHR_debug
GL_KHR_texture_compression_astc_ldr
GL_OES_depth_texture_cube_map
GL_OES_required_internalformat
GL_OES_surfaceless_context
GL_EXT_color_buffer_float
GL_EXT_sRGB_write_control
GL_EXT_separate_shader_objects
GL_EXT_shader_implicit_conversions
GL_EXT_shader_integer_mix
GL_EXT_base_instance
GL_EXT_compressed_ETC1_RGB8_sub_texture
GL_EXT_copy_image
GL_EXT_draw_buffers_indexed
GL_EXT_draw_elements_base_vertex
GL_EXT_polygon_offset_clamp
GL_EXT_render_snorm
GL_EXT_shader_io_blocks
GL_EXT_texture_border_clamp
GL_EXT_texture_buffer
GL_EXT_texture_norm16
GL_EXT_texture_view
GL_KHR_context_flush_control
GL_NV_image_formats
GL_OES_copy_image
GL_OES_draw_buffers_indexed
GL_OES_draw_elements_base_vertex
GL_OES_shader_io_blocks
GL_OES_texture_border_clamp
GL_OES_texture_buffer
GL_OES_texture_stencil8
GL_OES_texture_storage_multisample_2d_array
GL_OES_texture_view
GL_EXT_blend_func_extended
GL_EXT_buffer_storage
GL_EXT_float_blend
GL_KHR_no_error
GL_KHR_texture_compression_astc_sliced_3d
GL_OES_EGL_image_external_essl3
GL_OES_shader_image_atomic
GL_EXT_clip_cull_distance
GL_EXT_disjoint_timer_query
GL_EXT_texture_compression_s3tc_srgb
GL_MESA_shader_integer_functions
GL_EXT_clip_control
GL_EXT_texture_compression_bptc
GL_KHR_parallel_shader_compile
GL_EXT_texture_sRGB_R8
GL_MESA_framebuffer_flip_y
GL_EXT_depth_clamp
GL_EXT_texture_query_lod
I'm looking to update a 3D scatter plot in real time and hope that pyqtgraph can be used for this, a good first step would be for the example to work.