Skip to content

Various OpenGL fixes#3260

Merged
j9ac9k merged 5 commits intopyqtgraph:masterfrom
pijyoi:opengl-fixes
Feb 24, 2025
Merged

Various OpenGL fixes#3260
j9ac9k merged 5 commits intopyqtgraph:masterfrom
pijyoi:opengl-fixes

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Feb 24, 2025

  1. A regression was introduced in 1768175. The bug gets triggered if a GLGraphItem uses pxMode=False.

    In the original code, the view would be queried from the parent if the GLScatterPlotItem didn't have a view itself. This adhoc logic was implemented by Implement a GLGraphItem according to #807 #1721, in the very first implementation of GLGraphItem. i.e. GLGraphItem was the first GLGraphicsItem to use GLScatterPlotItem as a child.

    The fix is to implement GLGraphicsItem::view() such that it will automatically return the top level object's view for all its children.

  2. GLGraphicsItem was storing its children in an unordered set. Thus for any GLGraphicsItem with more than 1 child, the rendering would occur in a random order from run-to-run. This includes GLGraphItem, which has 2 children.

  3. For non-macOS platforms set to Core Forward Compatible profiles, the logic to clamp widths to the permitted range failed. By definition, Core Forward Compatible profiles support only widths of 1.0. For all other profiles, it is not an error to provide a (positive) line width that is out of range. The driver will just clamp the value to its supported range.

non-macOS platforms do not reflect a width limit of [1, 1] when they are
switched to Core Forward Compatible profiles.
(ignoring for the moment that non-macOS platforms do not need to be set
to Forward Compatible...)
@j9ac9k j9ac9k merged commit 8f8446d into pyqtgraph:master Feb 24, 2025
36 checks passed
@pijyoi pijyoi deleted the opengl-fixes branch February 24, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants