Skip to content

GLLinePlotItem: restore changes to state#3223

Merged
j9ac9k merged 2 commits intopyqtgraph:masterfrom
pijyoi:fix-opengl-pop
Jan 25, 2025
Merged

GLLinePlotItem: restore changes to state#3223
j9ac9k merged 2 commits intopyqtgraph:masterfrom
pijyoi:fix-opengl-pop

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Jan 16, 2025

Issue: when running the GLMeshItem example, the line edges and wireframe can be seen to be thicker than before (e.g. 0.13.7)

Reason:
Drawing the grid enables anti-aliasing which is not disabled after. Thus when drawing the edges of the meshes, anti-aliasing is also enabled, where previously it was not.

For compatibility with OpenGL ES and also Core profile, ecab72b removed calls to glPushAttrib and glPopAttrib. Those calls wrapped around the rendering of each GLGraphicsItem, effectively allowing each item to make changes to the global OpenGL state without restoring them.

Fix:
Restore the global state to their initial defaults in GLLinePlotItem.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Jan 25, 2025

Thanks for the PR @pijyoi love to see the OpenGL support keep improving ❤️

@j9ac9k j9ac9k merged commit 3c990ca into pyqtgraph:master Jan 25, 2025
@pijyoi pijyoi deleted the fix-opengl-pop branch January 25, 2025 08:31
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