is there a way to use Qt QML backend? Qt QML uses QML Item , Its also possible to get the QML to create framebuffer, I am very new to OpenGL , used Pyvista , Pyqtgraphs with Qt widgets, I am looking for options to move to QML (preferably with Qt6). Looks like pyvista with QML is complicated as the way VTK works, Vispy seems much promising with both 2d charts (line charts) and 3d charts (surface mesh).
Some more details are https://stackoverflow.com/questions/68517058/can-not-get-pyvista-render-to-work-with-qt-qml-qquickframebufferobject , I am willing to contribute but could not get where to start.
@ericgyounkin If you are using VisPy 0.7+ then you should look at adding the ShadingFilter to your MeshVisual: https://vispy.org/api/vispy.visuals.filters.mesh.html#vispy.visuals.filters.mesh.ShadingFilter
You can access the default instance of this through the
MeshVisual.shading property or you can create your own filter and attach it after you create the MeshVisual.
You can see examples of this in this example: https://vispy.org/gallery/scene/mesh_shading.html
scatter.antialias = Falseand see if that fixes what you're seeing
scatter.set_gl_state(blend=False, cull_face=False, depth_test=False)
Eh learning more OpenGL may not be the best thing if this is "good enough" for you right now @ericgyounkin. You may have complications in the future with these settings if you try to put other Visuals in the same canvas as your Markers. Overlapping Visuals with your Markers may end up being drawn weird.
Did the antialiasing change anything (without changing
set_gl_state)? My guess is that for some reason the depth testing seems to think that all the markers are behind one another in the original case and decides not to draw some/most of them. Hard to tell right now though.
@blackbanana_gitlab What are you trying to accomplish? Everything we have is described here: https://vispy.org/
Admittedly it needs a lot of work. I would suggest as a beginner to use the SceneCanvas and look at the Gallery of examples for the "Scene". There are also resources linked on our website about OpenGL understanding the basics of that.
def _process_mouse_event(self, event, override_picked=False): prof = Profiler() # noqa next_picked = None # sync hack deliver_types = ['mouse_press', 'mouse_wheel'] if self._send_hover_events: deliver_types += ['mouse_move'] picked = self._mouse_handler if not override_picked else override_picked if picked is None: if event.type in deliver_types: picked = self.visual_at(event.pos) # NOTE: hack to sync other ViewBox, should check a sync dict or parameter of VisualNodes instead if type(picked) == ViewBox and not override_picked: next_picked = VisualNode._visual_ids # No visual to handle this event; bail out now if picked is None: return # Create an event to pass to the picked visual scene_event = SceneMouseEvent(event=event, visual=picked) # Deliver the event if override_picked: # we know ViewBox handles event directly so don't need to search parents and don't want to change _mouse_handler getattr(picked.events, event.type)(scene_event) elif picked == self._mouse_handler: # If we already have a mouse handler, then no other node may # receive the event if event.type == 'mouse_release': self._mouse_handler = None getattr(picked.events, event.type)(scene_event) else: # If we don't have a mouse handler, then pass the event through # the chain of parents until a node accepts the event. while picked is not None: getattr(picked.events, event.type)(scene_event) if scene_event.handled: if event.type == 'mouse_press': self._mouse_handler = picked break if event.type in deliver_types: # events that are not handled get passed to parent picked = picked.parent scene_event.visual = picked else: picked = None # If something in the scene handled the scene_event, then we mark # the original event accordingly. event.handled = scene_event.handled if next_picked: # propagate to synced node self._process_mouse_event(event, override_picked=next_picked)